Module: Grape::Jwt::Authentication

Extended by:
ActiveSupport::Concern, Extensions::Dependencies
Defined in:
lib/grape/jwt/authentication.rb,
lib/grape/jwt/authentication/version.rb,
lib/grape/jwt/authentication/jwt_handler.rb,
lib/grape/jwt/authentication/configuration.rb,
lib/grape/jwt/authentication/extensions/dependencies.rb

Overview

The gem version details.

Defined Under Namespace

Modules: Extensions Classes: Configuration, JwtHandler

Constant Summary collapse

VERSION =

The version of the grape-jwt-authentication gem

'3.5.0'

Constants included from Extensions::Dependencies

Extensions::Dependencies::KEYLESS_CONFIGURATION

Class Attribute Summary collapse

Class Method Summary collapse

Methods included from Extensions::Dependencies

configure_dependencies, configure_keyless

Class Attribute Details

.configurationConfiguration

Retrieve the current configuration object.

Returns:



41
42
43
# File 'lib/grape/jwt/authentication.rb', line 41

def configuration
  @configuration ||= Configuration.new
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

Configure the concern by providing a block which takes care of this task. Example:

Grape::Jwt::Authentication.configure do |conf|
  # conf.xyz = [..]
end

Yields:



51
52
53
54
# File 'lib/grape/jwt/authentication.rb', line 51

def configure
  yield(configuration)
  configure_dependencies
end

.gem_versionGem::Version

Returns the version of the gem as a Gem::Version.

Returns:

  • (Gem::Version)

    the gem version as object



21
22
23
# File 'lib/grape/jwt/authentication/version.rb', line 21

def gem_version
  Gem::Version.new VERSION
end

.reset_configuration!Object

Reset the current configuration with the default one.



57
58
59
60
# File 'lib/grape/jwt/authentication.rb', line 57

def reset_configuration!
  self.configuration = Configuration.new
  configure_dependencies
end

.versionString

Returns the version of gem as a string.

Returns:

  • (String)

    the gem version as string



14
15
16
# File 'lib/grape/jwt/authentication/version.rb', line 14

def version
  VERSION
end