Class: SimpleJwtAuth::Configuration
- Inherits:
-
Object
- Object
- SimpleJwtAuth::Configuration
- Defined in:
- lib/simple_jwt_auth/configuration.rb
Instance Attribute Summary collapse
-
#algorithm ⇒ Object
Returns the value of attribute algorithm.
-
#exp_leeway ⇒ Object
Returns the value of attribute exp_leeway.
-
#exp_seconds ⇒ Object
Returns the value of attribute exp_seconds.
-
#issuer ⇒ Object
Returns the value of attribute issuer.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#secrets_config ⇒ Object
Returns the value of attribute secrets_config.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/simple_jwt_auth/configuration.rb', line 12 def initialize # Defaults to stdout and level info, can be configured @logger = ::Logger.new($stdout) @logger.level = ::Logger::INFO # https://www.rfc-editor.org/rfc/rfc7519#section-4.1.4 @exp_seconds = 30 # Small leeway to account for clock skew (seconds) @exp_leeway = 10 # HMAC SHA-256 hash algorithm @algorithm = 'HS256' # A map of issuers and corresponding secrets @secrets_config = {} end |
Instance Attribute Details
#algorithm ⇒ Object
Returns the value of attribute algorithm.
5 6 7 |
# File 'lib/simple_jwt_auth/configuration.rb', line 5 def algorithm @algorithm end |
#exp_leeway ⇒ Object
Returns the value of attribute exp_leeway.
5 6 7 |
# File 'lib/simple_jwt_auth/configuration.rb', line 5 def exp_leeway @exp_leeway end |
#exp_seconds ⇒ Object
Returns the value of attribute exp_seconds.
5 6 7 |
# File 'lib/simple_jwt_auth/configuration.rb', line 5 def exp_seconds @exp_seconds end |
#issuer ⇒ Object
Returns the value of attribute issuer.
5 6 7 |
# File 'lib/simple_jwt_auth/configuration.rb', line 5 def issuer @issuer end |
#logger ⇒ Object
Returns the value of attribute logger.
5 6 7 |
# File 'lib/simple_jwt_auth/configuration.rb', line 5 def logger @logger end |
#secrets_config ⇒ Object
Returns the value of attribute secrets_config.
5 6 7 |
# File 'lib/simple_jwt_auth/configuration.rb', line 5 def secrets_config @secrets_config end |