Class: Usps::JwtAuth::Config
- Inherits:
-
Object
- Object
- Usps::JwtAuth::Config
- Defined in:
- lib/usps/jwt_auth/config.rb
Overview
Configure JWT Authentication
Instance Attribute Summary collapse
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#jwt ⇒ Object
Returns the value of attribute jwt.
- #key_size ⇒ Object
-
#keys_path ⇒ Object
Returns the value of attribute keys_path.
-
#public_keys_path ⇒ Object
Returns the value of attribute public_keys_path.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ Config
constructor
A new instance of Config.
- #issuer ⇒ Object
Constructor Details
#initialize {|_self| ... } ⇒ Config
Returns a new instance of Config.
12 13 14 |
# File 'lib/usps/jwt_auth/config.rb', line 12 def initialize yield self if block_given? end |
Instance Attribute Details
#environment ⇒ Object
Returns the value of attribute environment.
8 9 10 |
# File 'lib/usps/jwt_auth/config.rb', line 8 def environment @environment end |
#jwt ⇒ Object
Returns the value of attribute jwt.
10 11 12 |
# File 'lib/usps/jwt_auth/config.rb', line 10 def jwt @jwt end |
#key_size ⇒ Object
16 17 18 |
# File 'lib/usps/jwt_auth/config.rb', line 16 def key_size @key_size || 4096 end |
#keys_path ⇒ Object
Returns the value of attribute keys_path.
10 11 12 |
# File 'lib/usps/jwt_auth/config.rb', line 10 def keys_path @keys_path end |
#public_keys_path ⇒ Object
Returns the value of attribute public_keys_path.
10 11 12 |
# File 'lib/usps/jwt_auth/config.rb', line 10 def public_keys_path @public_keys_path end |
Instance Method Details
#issuer ⇒ Object
38 39 40 |
# File 'lib/usps/jwt_auth/config.rb', line 38 def issuer /\A#{jwt.issuer_base}(?::#{RegExp.union(jwt.issuers)})?\z/ end |