Class: AppleAuth::Token
- Inherits:
-
Object
- Object
- AppleAuth::Token
- Defined in:
- lib/apple_auth/token.rb
Constant Summary collapse
- APPLE_AUD =
'https://appleid.apple.com'
- APPLE_CONFIG =
AppleAuth.config
- APPLE_CODE_TYPE =
'authorization_code'
- APPLE_ALG =
'ES256'
Instance Method Summary collapse
-
#authenticate! ⇒ Object
:reek:FeatureEnvy.
-
#initialize(code) ⇒ Token
constructor
A new instance of Token.
Constructor Details
#initialize(code) ⇒ Token
Returns a new instance of Token.
10 11 12 |
# File 'lib/apple_auth/token.rb', line 10 def initialize(code) @code = code end |
Instance Method Details
#authenticate! ⇒ Object
:reek:FeatureEnvy
15 16 17 18 19 20 |
# File 'lib/apple_auth/token.rb', line 15 def authenticate! access_token = apple_access_token access_token.refresh! if access_token.expired? reponse_hash(access_token) end |