Class: Keycloak::PublicKeyResolver

Inherits:
Object
  • Object
show all
Defined in:
lib/keycloak-api-rails/public_key_resolver.rb

Instance Method Summary collapse

Constructor Details

#initialize(http_client, realm_id) ⇒ PublicKeyResolver

Returns a new instance of PublicKeyResolver.



3
4
5
6
# File 'lib/keycloak-api-rails/public_key_resolver.rb', line 3

def initialize(http_client, realm_id)
  @realm_id    = realm_id
  @http_client = http_client
end

Instance Method Details

#find_public_keysObject



8
9
10
# File 'lib/keycloak-api-rails/public_key_resolver.rb', line 8

def find_public_keys
  JSON::JWK::Set.new(@http_client.get(@realm_id, "protocol/openid-connect/certs")["keys"])
end