Class: RackJwtVerifier::KeySource::Static
- Inherits:
-
Object
- Object
- RackJwtVerifier::KeySource::Static
- Defined in:
- lib/rack_jwt_verifier/key_source.rb
Overview
A key handed over directly: a PEM string, a certificate PEM, or an OpenSSL::PKey. Nothing to fetch, cache or refresh.
Instance Attribute Summary collapse
-
#verification_key ⇒ Object
readonly
Returns the value of attribute verification_key.
Instance Method Summary collapse
-
#initialize(key) ⇒ Static
constructor
A new instance of Static.
- #jwks? ⇒ Boolean
- #refresh! ⇒ Object
Constructor Details
#initialize(key) ⇒ Static
39 40 41 42 43 |
# File 'lib/rack_jwt_verifier/key_source.rb', line 39 def initialize(key) @verification_key = KeySource.parse_public_key(key) rescue OpenSSL::PKey::PKeyError, OpenSSL::X509::CertificateError => e raise ConfigurationError, "public_key is not a valid PEM public key or certificate: #{e.}" end |
Instance Attribute Details
#verification_key ⇒ Object (readonly)
Returns the value of attribute verification_key.
37 38 39 |
# File 'lib/rack_jwt_verifier/key_source.rb', line 37 def verification_key @verification_key end |
Instance Method Details
#jwks? ⇒ Boolean
45 46 47 |
# File 'lib/rack_jwt_verifier/key_source.rb', line 45 def jwks? false end |
#refresh! ⇒ Object
49 50 51 |
# File 'lib/rack_jwt_verifier/key_source.rb', line 49 def refresh! false end |