Class: AppleAuth::Conditions::IssCondition
- Inherits:
-
Object
- Object
- AppleAuth::Conditions::IssCondition
- Defined in:
- lib/apple_auth/helpers/conditions/iss_condition.rb
Constant Summary collapse
- APPLE_ISS =
'https://appleid.apple.com'
Instance Method Summary collapse
-
#initialize(jwt) ⇒ IssCondition
constructor
A new instance of IssCondition.
- #validate! ⇒ Object
Constructor Details
#initialize(jwt) ⇒ IssCondition
Returns a new instance of IssCondition.
8 9 10 |
# File 'lib/apple_auth/helpers/conditions/iss_condition.rb', line 8 def initialize(jwt) @iss = jwt['iss'] end |
Instance Method Details
#validate! ⇒ Object
12 13 14 15 16 |
# File 'lib/apple_auth/helpers/conditions/iss_condition.rb', line 12 def validate! return true if @iss.include?(APPLE_ISS) raise JWTValidationError, 'jwt_iss is different to apple_iss' end |