Module: Doorkeeper::JWT
- Defined in:
- lib/doorkeeper/jwt.rb,
lib/doorkeeper/jwt/config.rb,
lib/doorkeeper/jwt/version.rb
Defined Under Namespace
Modules: VERSION
Classes: Config, MissingConfiguration
Class Method Summary
collapse
Class Method Details
.configuration ⇒ Object
15
16
17
|
# File 'lib/doorkeeper/jwt/config.rb', line 15
def self.configuration
@config || raise(MissingConfiguration)
end
|
11
12
13
|
# File 'lib/doorkeeper/jwt/config.rb', line 11
def self.configure(&block)
@config = Config::Builder.new(&block).build
end
|
.gem_version ⇒ Object
5
6
7
|
# File 'lib/doorkeeper/jwt/version.rb', line 5
def self.gem_version
Gem::Version.new VERSION::STRING
end
|
.generate(opts = {}) ⇒ Object
10
11
12
13
14
15
16
17
|
# File 'lib/doorkeeper/jwt.rb', line 10
def generate(opts = {})
::JWT.encode(
token_payload(opts),
secret_key(opts),
signing_method,
(opts)
)
end
|