Class: Auth0::Verifier::Jwks

Inherits:
Object
  • Object
show all
Defined in:
lib/auth0/verifier/jwks.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ Jwks

Returns a new instance of Jwks.



14
15
16
# File 'lib/auth0/verifier/jwks.rb', line 14

def initialize(url)
  @url = url
end

Instance Attribute Details

#urlObject (readonly)

Returns the value of attribute url.



12
13
14
# File 'lib/auth0/verifier/jwks.rb', line 12

def url
  @url
end

Instance Method Details

#keysObject



18
19
20
21
22
23
24
25
26
27
# File 'lib/auth0/verifier/jwks.rb', line 18

def keys
  return unless data

  jwks_keys = Array(data['keys'])
  jwks_keys.each_with_object({}) do |key, object|
    next unless key['alg'] == 'RS256'

    object[key['kid']] = key_certificate(key)
  end
end