Class: Keycloak::PublicKeyResolver
- Inherits:
-
Object
- Object
- Keycloak::PublicKeyResolver
- Defined in:
- lib/keycloak-api-rails/public_key_resolver.rb
Instance Method Summary collapse
- #find_public_keys ⇒ Object
-
#initialize(http_client, realm_id) ⇒ PublicKeyResolver
constructor
A new instance of PublicKeyResolver.
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_keys ⇒ Object
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 |