Module: JWTKeeper

Defined in:
lib/jwt_keeper/version.rb,
lib/jwt_keeper.rb,
lib/jwt_keeper/token.rb,
lib/jwt_keeper/engine.rb,
lib/jwt_keeper/datastore.rb,
lib/jwt_keeper/controller.rb,
lib/jwt_keeper/exceptions.rb,
lib/jwt_keeper/configuration.rb

Overview

Gem Version

Defined Under Namespace

Modules: Controller, Datastore Classes: BadIssuerError, Configuration, EarlyTokenError, Engine, ExpiredTokenError, InvalidTokenError, LousyAudienceError, RevokedTokenError, Token

Constant Summary collapse

VERSION =
'3.0.1'.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject (readonly)

Returns the value of attribute configuration


15
16
17
# File 'lib/jwt_keeper.rb', line 15

def configuration
  @configuration
end

.datastoreObject (readonly)

Returns the value of attribute datastore


15
16
17
# File 'lib/jwt_keeper.rb', line 15

def datastore
  @datastore
end

Class Method Details

.configure(new_configuration = Configuration.new) {|new_configuration| ... } ⇒ Configuration

Creates/sets a new configuration for the gem, yield a configuration object

Parameters:

  • new_configuration (Configuration) (defaults to: Configuration.new)

    new configuration

Yields:

  • (new_configuration)

Returns:


21
22
23
24
25
# File 'lib/jwt_keeper.rb', line 21

def self.configure(new_configuration = Configuration.new)
  yield(new_configuration) if block_given?

  @configuration = new_configuration.freeze
end