Class: Zaikio::JWTAuth::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/zaikio/jwt_auth/configuration.rb

Constant Summary collapse

HOSTS =
{
  development: "http://hub.zaikio.test",
  test: "http://hub.zaikio.test",
  staging: "https://hub.staging.zaikio.com",
  sandbox: "https://hub.sandbox.zaikio.com",
  production: "https://hub.zaikio.com"
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



18
19
20
21
22
23
# File 'lib/zaikio/jwt_auth/configuration.rb', line 18

def initialize
  @environment = :sandbox
  @revoked_token_ids = nil
  @keys = nil
  @test_mode = false
end

Instance Attribute Details

#app_nameObject

Returns the value of attribute app_name.



14
15
16
# File 'lib/zaikio/jwt_auth/configuration.rb', line 14

def app_name
  @app_name
end

#cacheObject

Returns the value of attribute cache.



14
15
16
# File 'lib/zaikio/jwt_auth/configuration.rb', line 14

def cache
  @cache
end

#environmentObject

Returns the value of attribute environment.



15
16
17
# File 'lib/zaikio/jwt_auth/configuration.rb', line 15

def environment
  @environment
end

#hostObject

Returns the value of attribute host.



14
15
16
# File 'lib/zaikio/jwt_auth/configuration.rb', line 14

def host
  @host
end

#keysObject



34
35
36
# File 'lib/zaikio/jwt_auth/configuration.rb', line 34

def keys
  @keys.is_a?(Proc) ? @keys.call : @keys
end

#loggerObject



25
26
27
# File 'lib/zaikio/jwt_auth/configuration.rb', line 25

def logger
  @logger ||= Logger.new($stdout)
end

#revoked_token_idsObject



38
39
40
# File 'lib/zaikio/jwt_auth/configuration.rb', line 38

def revoked_token_ids
  @revoked_token_ids.is_a?(Proc) ? @revoked_token_ids.call : @revoked_token_ids
end

#test_modeObject

Returns the value of attribute test_mode.



14
15
16
# File 'lib/zaikio/jwt_auth/configuration.rb', line 14

def test_mode
  @test_mode
end