Class: JWTSignedRequest::Verify
- Inherits:
-
Object
- Object
- JWTSignedRequest::Verify
- Defined in:
- lib/jwt_signed_request/verify.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(request:, secret_key: nil, algorithm: nil, leeway: nil, key_store_id: nil) ⇒ Verify
constructor
TODO: secret_key & algorithm is deprecated and will be removed in future.
Constructor Details
#initialize(request:, secret_key: nil, algorithm: nil, leeway: nil, key_store_id: nil) ⇒ Verify
TODO: secret_key & algorithm is deprecated and will be removed in future. For now we will support its functionality
15 16 17 18 19 20 21 |
# File 'lib/jwt_signed_request/verify.rb', line 15 def initialize(request:, secret_key: nil, algorithm: nil, leeway: nil, key_store_id: nil) @request = request @secret_key = secret_key @algorithm = algorithm @leeway = leeway @key_store_id = key_store_id end |
Class Method Details
.call(**args) ⇒ Object
9 10 11 |
# File 'lib/jwt_signed_request/verify.rb', line 9 def self.call(**args) new(**args).call end |
Instance Method Details
#call ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/jwt_signed_request/verify.rb', line 23 def call if jwt_token.nil? raise MissingAuthorizationHeaderError, "Missing Authorization header in the request" end verify_request! end |