Module: Usps::JwtAuth::Config

Defined in:
lib/usps/jwt_auth/config.rb

Overview

Configure JWT Authentication

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#environmentObject

Returns the value of attribute environment.



8
9
10
# File 'lib/usps/jwt_auth/config.rb', line 8

def environment
  @environment
end

#jwtObject

Returns the value of attribute jwt.



10
11
12
# File 'lib/usps/jwt_auth/config.rb', line 10

def jwt
  @jwt
end

#key_sizeObject



16
17
18
# File 'lib/usps/jwt_auth/config.rb', line 16

def key_size
  @key_size || 4096
end

#keys_pathObject

Returns the value of attribute keys_path.



8
9
10
# File 'lib/usps/jwt_auth/config.rb', line 8

def keys_path
  @keys_path
end

#public_keys_pathObject

Returns the value of attribute public_keys_path.



8
9
10
# File 'lib/usps/jwt_auth/config.rb', line 8

def public_keys_path
  @public_keys_path
end

Instance Method Details

#initialize {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



12
13
14
# File 'lib/usps/jwt_auth/config.rb', line 12

def initialize
  yield self if block_given?
end

#issuerObject



30
31
32
# File 'lib/usps/jwt_auth/config.rb', line 30

def issuer
  /\A#{jwt.issuer_base}(?::#{RegExp.union(jwt.issuers)})?\z/
end