Class: AppleAuth::UserIdentity
- Inherits:
-
Object
- Object
- AppleAuth::UserIdentity
- Defined in:
- lib/apple_auth/user_identity.rb
Instance Attribute Summary collapse
-
#jwt ⇒ Object
readonly
Returns the value of attribute jwt.
-
#user_identity ⇒ Object
readonly
Returns the value of attribute user_identity.
Instance Method Summary collapse
-
#initialize(user_identity, jwt) ⇒ UserIdentity
constructor
A new instance of UserIdentity.
- #validate! ⇒ Object
Constructor Details
#initialize(user_identity, jwt) ⇒ UserIdentity
Returns a new instance of UserIdentity.
7 8 9 10 |
# File 'lib/apple_auth/user_identity.rb', line 7 def initialize(user_identity, jwt) @user_identity = user_identity @jwt = jwt end |
Instance Attribute Details
#jwt ⇒ Object (readonly)
Returns the value of attribute jwt.
5 6 7 |
# File 'lib/apple_auth/user_identity.rb', line 5 def jwt @jwt end |
#user_identity ⇒ Object (readonly)
Returns the value of attribute user_identity.
5 6 7 |
# File 'lib/apple_auth/user_identity.rb', line 5 def user_identity @user_identity end |
Instance Method Details
#validate! ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/apple_auth/user_identity.rb', line 12 def validate! token_data = JWTDecoder.new(jwt).call JWTConditions.new(user_identity, token_data).validate! token_data.symbolize_keys end |