Class: AppleAuth::JWTServerConditions
- Inherits:
-
Object
- Object
- AppleAuth::JWTServerConditions
- Includes:
- Conditions
- Defined in:
- lib/apple_auth/helpers/jwt_server_conditions.rb
Constant Summary collapse
- CONDITIONS =
[ AudCondition, IatCondition, IssCondition ].freeze
Instance Attribute Summary collapse
-
#decoded_jwt ⇒ Object
readonly
Returns the value of attribute decoded_jwt.
Instance Method Summary collapse
-
#initialize(decoded_jwt) ⇒ JWTServerConditions
constructor
A new instance of JWTServerConditions.
- #validate! ⇒ Object
Constructor Details
#initialize(decoded_jwt) ⇒ JWTServerConditions
Returns a new instance of JWTServerConditions.
15 16 17 |
# File 'lib/apple_auth/helpers/jwt_server_conditions.rb', line 15 def initialize(decoded_jwt) @decoded_jwt = decoded_jwt end |
Instance Attribute Details
#decoded_jwt ⇒ Object (readonly)
Returns the value of attribute decoded_jwt.
13 14 15 |
# File 'lib/apple_auth/helpers/jwt_server_conditions.rb', line 13 def decoded_jwt @decoded_jwt end |
Instance Method Details
#validate! ⇒ Object
19 20 21 22 23 |
# File 'lib/apple_auth/helpers/jwt_server_conditions.rb', line 19 def validate! JWT::ClaimsValidator.new(decoded_jwt).validate! && jwt_conditions_validate! rescue JWT::InvalidPayload => e raise JWTValidationError, e. end |