Class: InheritedProofing::JwtDecoder
- Inherits:
-
Object
- Object
- InheritedProofing::JwtDecoder
- Defined in:
- lib/inherited_proofing/jwt_decoder.rb
Constant Summary collapse
- JWT_ENCODE_ALGORITHM =
'RS256'
Instance Attribute Summary collapse
-
#access_token_jwt ⇒ Object
readonly
Returns the value of attribute access_token_jwt.
Instance Method Summary collapse
-
#initialize(access_token_jwt:) ⇒ JwtDecoder
constructor
A new instance of JwtDecoder.
- #perform ⇒ Object
Constructor Details
#initialize(access_token_jwt:) ⇒ JwtDecoder
Returns a new instance of JwtDecoder.
12 13 14 |
# File 'lib/inherited_proofing/jwt_decoder.rb', line 12 def initialize(access_token_jwt:) @access_token_jwt = access_token_jwt end |
Instance Attribute Details
#access_token_jwt ⇒ Object (readonly)
Returns the value of attribute access_token_jwt.
8 9 10 |
# File 'lib/inherited_proofing/jwt_decoder.rb', line 8 def access_token_jwt @access_token_jwt end |
Instance Method Details
#perform ⇒ Object
16 17 18 19 20 21 |
# File 'lib/inherited_proofing/jwt_decoder.rb', line 16 def perform access_token = jwt_decode_access_token raise Errors::AccessTokenMissingRequiredAttributesError unless access_token.inherited_proofing_auth OpenStruct.new({ inherited_proofing_auth: access_token.inherited_proofing_auth }) end |