Module: Usps::JwtAuth

Defined in:
lib/usps/jwt_auth.rb,
lib/usps/jwt_auth/config.rb,
lib/usps/jwt_auth/decode.rb,
lib/usps/jwt_auth/encode.rb,
lib/usps/jwt_auth/concern.rb,
lib/usps/jwt_auth/railtie.rb,
lib/usps/jwt_auth/version.rb

Overview

Unified configuration for handling JWT Authentication

Defined Under Namespace

Modules: Concern Classes: Config, Decode, Encode, Railtie

Constant Summary collapse

ALGORITHM =
'RS512'
VERSION =
'0.1.0'

Class Method Summary collapse

Class Method Details

.configurationObject



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

def configuration
  @configuration ||= Config.new
end

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

Yields:



18
19
20
21
# File 'lib/usps/jwt_auth.rb', line 18

def configure
  yield(configuration) if block_given?
  configuration
end

.decodeObject



27
28
29
# File 'lib/usps/jwt_auth.rb', line 27

def decode(...)
  Decode.decode(...)
end

.encodeObject



23
24
25
# File 'lib/usps/jwt_auth.rb', line 23

def encode(...)
  Encode.encode(...)
end