Class: AppStoreDevApi::Client::Authorization
- Inherits:
-
Object
- Object
- AppStoreDevApi::Client::Authorization
- Defined in:
- lib/app_store_dev_api/client/authorization.rb
Constant Summary collapse
- OPTIONS =
%i[key_id issuer_id private_key].freeze
- AUDIENCE =
'appstoreconnect-v1'
- ALGORITHM =
'ES256'
Instance Method Summary collapse
- #header_fields ⇒ Object
-
#initialize(options) ⇒ Authorization
constructor
A new instance of Authorization.
- #payload ⇒ Object
- #token ⇒ Object
Constructor Details
#initialize(options) ⇒ Authorization
Returns a new instance of Authorization.
15 16 17 18 19 |
# File 'lib/app_store_dev_api/client/authorization.rb', line 15 def initialize() @key_id = .fetch(:key_id) @issuer_id = .fetch(:issuer_id) @private_key = OpenSSL::PKey.read(.fetch(:private_key)) end |
Instance Method Details
#header_fields ⇒ Object
29 30 31 |
# File 'lib/app_store_dev_api/client/authorization.rb', line 29 def header_fields { kid: key_id } end |