Class: JWT::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/jwt/auth_zero/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



28
29
30
31
32
# File 'lib/jwt/auth_zero/configuration.rb', line 28

def initialize
  @client_id = nil
  @client_domain = nil
  @client_secret = nil
end

Instance Attribute Details

#client_domain=(value) ⇒ Object (writeonly)

Sets the attribute client_domain

Parameters:

  • value

    the value to set the attribute client_domain to.



26
27
28
# File 'lib/jwt/auth_zero/configuration.rb', line 26

def client_domain=(value)
  @client_domain = value
end

#client_id=(value) ⇒ Object (writeonly)

Sets the attribute client_id

Parameters:

  • value

    the value to set the attribute client_id to.



26
27
28
# File 'lib/jwt/auth_zero/configuration.rb', line 26

def client_id=(value)
  @client_id = value
end

#client_secretObject



46
47
48
49
# File 'lib/jwt/auth_zero/configuration.rb', line 46

def client_secret
  raise 'Missing "client_secret" for JWT::AuthZero' if @client_secret.nil?
  @client_secret
end

Instance Method Details

#decode_optionsObject



34
35
36
37
38
39
40
41
42
43
44
# File 'lib/jwt/auth_zero/configuration.rb', line 34

def decode_options
  ensure_decode_options_present
  {
    iss: @client_domain,
    aud: @client_id,
    verify_iss: true,
    verify_aud: true,
    verify_iat: true,
    algorithm: 'HS256'
  }
end