Class: AppleAuth::Conditions::AudCondition
- Inherits:
-
Object
- Object
- AppleAuth::Conditions::AudCondition
- Defined in:
- lib/apple_auth/helpers/conditions/aud_condition.rb
Instance Method Summary collapse
-
#initialize(jwt) ⇒ AudCondition
constructor
A new instance of AudCondition.
- #validate! ⇒ Object
Constructor Details
#initialize(jwt) ⇒ AudCondition
Returns a new instance of AudCondition.
6 7 8 |
# File 'lib/apple_auth/helpers/conditions/aud_condition.rb', line 6 def initialize(jwt) @aud = jwt['aud'] end |
Instance Method Details
#validate! ⇒ Object
10 11 12 13 14 |
# File 'lib/apple_auth/helpers/conditions/aud_condition.rb', line 10 def validate! return true if @aud == AppleAuth.config.apple_client_id raise JWTValidationError, 'jwt_aud is different to apple_client_id' end |