Class: AppStoreConnectApi::Authorization
- Inherits:
-
Object
- Object
- AppStoreConnectApi::Authorization
- Defined in:
- lib/app_store_connect_api/authorization.rb
Constant Summary collapse
- ALGORITHM =
'ES256'
Instance Method Summary collapse
-
#initialize(issuer_id, key_id, private_key) ⇒ Authorization
constructor
A new instance of Authorization.
- #token ⇒ Object
Constructor Details
#initialize(issuer_id, key_id, private_key) ⇒ Authorization
Returns a new instance of Authorization.
7 8 9 10 11 |
# File 'lib/app_store_connect_api/authorization.rb', line 7 def initialize(issuer_id, key_id, private_key) @issuer_id = issuer_id @key_id = key_id @private_key = private_key end |
Instance Method Details
#token ⇒ Object
13 14 15 |
# File 'lib/app_store_connect_api/authorization.rb', line 13 def token JWT.encode payload, private_key, ALGORITHM, header_fields end |