Class: JwkLoader::JwksUriProvider
- Inherits:
-
Object
- Object
- JwkLoader::JwksUriProvider
- Defined in:
- lib/jwk_loader/jwks_uri_provider.rb
Instance Attribute Summary collapse
-
#cache ⇒ Object
readonly
Returns the value of attribute cache.
-
#cache_grace_period ⇒ Object
readonly
Returns the value of attribute cache_grace_period.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
- #call(options) ⇒ Object
-
#initialize(uri:, cache:, cache_grace_period:) ⇒ JwksUriProvider
constructor
A new instance of JwksUriProvider.
Constructor Details
#initialize(uri:, cache:, cache_grace_period:) ⇒ JwksUriProvider
Returns a new instance of JwksUriProvider.
7 8 9 10 11 |
# File 'lib/jwk_loader/jwks_uri_provider.rb', line 7 def initialize(uri:, cache:, cache_grace_period:) @uri = uri @cache = cache @cache_grace_period = cache_grace_period end |
Instance Attribute Details
#cache ⇒ Object (readonly)
Returns the value of attribute cache.
5 6 7 |
# File 'lib/jwk_loader/jwks_uri_provider.rb', line 5 def cache @cache end |
#cache_grace_period ⇒ Object (readonly)
Returns the value of attribute cache_grace_period.
5 6 7 |
# File 'lib/jwk_loader/jwks_uri_provider.rb', line 5 def cache_grace_period @cache_grace_period end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
5 6 7 |
# File 'lib/jwk_loader/jwks_uri_provider.rb', line 5 def uri @uri end |
Instance Method Details
#call(options) ⇒ Object
13 14 15 16 |
# File 'lib/jwk_loader/jwks_uri_provider.rb', line 13 def call() invalidate_cache! if [:kid_not_found] || [:invalidate] jwks end |