Class: JWT::Configuration::DecodeConfiguration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDecodeConfiguration

Returns a new instance of DecodeConfiguration.



17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/jwt/configuration/decode_configuration.rb', line 17

def initialize
  @verify_expiration = true
  @verify_not_before = true
  @verify_iss = false
  @verify_iat = false
  @verify_jti = false
  @verify_aud = false
  @verify_sub = false
  @leeway = 0
  @algorithms = ['HS256']
  @required_claims = []
end

Instance Attribute Details

#algorithmsObject

Returns the value of attribute algorithms.



6
7
8
# File 'lib/jwt/configuration/decode_configuration.rb', line 6

def algorithms
  @algorithms
end

#leewayObject

Returns the value of attribute leeway.



6
7
8
# File 'lib/jwt/configuration/decode_configuration.rb', line 6

def leeway
  @leeway
end

#required_claimsObject

Returns the value of attribute required_claims.



6
7
8
# File 'lib/jwt/configuration/decode_configuration.rb', line 6

def required_claims
  @required_claims
end

#verify_audObject

Returns the value of attribute verify_aud.



6
7
8
# File 'lib/jwt/configuration/decode_configuration.rb', line 6

def verify_aud
  @verify_aud
end

#verify_expirationObject

Returns the value of attribute verify_expiration.



6
7
8
# File 'lib/jwt/configuration/decode_configuration.rb', line 6

def verify_expiration
  @verify_expiration
end

#verify_iatObject

Returns the value of attribute verify_iat.



6
7
8
# File 'lib/jwt/configuration/decode_configuration.rb', line 6

def verify_iat
  @verify_iat
end

#verify_issObject

Returns the value of attribute verify_iss.



6
7
8
# File 'lib/jwt/configuration/decode_configuration.rb', line 6

def verify_iss
  @verify_iss
end

#verify_jtiObject

Returns the value of attribute verify_jti.



6
7
8
# File 'lib/jwt/configuration/decode_configuration.rb', line 6

def verify_jti
  @verify_jti
end

#verify_not_beforeObject

Returns the value of attribute verify_not_before.



6
7
8
# File 'lib/jwt/configuration/decode_configuration.rb', line 6

def verify_not_before
  @verify_not_before
end

#verify_subObject

Returns the value of attribute verify_sub.



6
7
8
# File 'lib/jwt/configuration/decode_configuration.rb', line 6

def verify_sub
  @verify_sub
end

Instance Method Details

#to_hObject



30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/jwt/configuration/decode_configuration.rb', line 30

def to_h
  {
    verify_expiration: verify_expiration,
    verify_not_before: verify_not_before,
    verify_iss: verify_iss,
    verify_iat: verify_iat,
    verify_jti: verify_jti,
    verify_aud: verify_aud,
    verify_sub: verify_sub,
    leeway: leeway,
    algorithms: algorithms,
    required_claims: required_claims
  }
end