Class: KeycloakSdk::OidcEndpoints
- Inherits:
-
Object
- Object
- KeycloakSdk::OidcEndpoints
- Defined in:
- lib/keycloak_sdk/oidc_endpoints.rb
Overview
Keycloak realm의 OIDC 엔드포인트를 규약대로 조립한다(네트워크 없음).
Instance Attribute Summary collapse
-
#authorization ⇒ Object
readonly
Returns the value of attribute authorization.
-
#end_session ⇒ Object
readonly
Returns the value of attribute end_session.
-
#introspection ⇒ Object
readonly
Returns the value of attribute introspection.
-
#issuer ⇒ Object
readonly
Returns the value of attribute issuer.
-
#jwks ⇒ Object
readonly
Returns the value of attribute jwks.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(server_url, realm) ⇒ OidcEndpoints
constructor
A new instance of OidcEndpoints.
Constructor Details
#initialize(server_url, realm) ⇒ OidcEndpoints
Returns a new instance of OidcEndpoints.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/keycloak_sdk/oidc_endpoints.rb', line 8 def initialize(server_url, realm) base = "#{server_url}/realms/#{realm}" oidc = "#{base}/protocol/openid-connect" @issuer = base @authorization = "#{oidc}/auth" @token = "#{oidc}/token" @introspection = "#{oidc}/token/introspect" @end_session = "#{oidc}/logout" @jwks = "#{oidc}/certs" freeze end |
Instance Attribute Details
#authorization ⇒ Object (readonly)
Returns the value of attribute authorization.
6 7 8 |
# File 'lib/keycloak_sdk/oidc_endpoints.rb', line 6 def @authorization end |
#end_session ⇒ Object (readonly)
Returns the value of attribute end_session.
6 7 8 |
# File 'lib/keycloak_sdk/oidc_endpoints.rb', line 6 def end_session @end_session end |
#introspection ⇒ Object (readonly)
Returns the value of attribute introspection.
6 7 8 |
# File 'lib/keycloak_sdk/oidc_endpoints.rb', line 6 def introspection @introspection end |
#issuer ⇒ Object (readonly)
Returns the value of attribute issuer.
6 7 8 |
# File 'lib/keycloak_sdk/oidc_endpoints.rb', line 6 def issuer @issuer end |
#jwks ⇒ Object (readonly)
Returns the value of attribute jwks.
6 7 8 |
# File 'lib/keycloak_sdk/oidc_endpoints.rb', line 6 def jwks @jwks end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
6 7 8 |
# File 'lib/keycloak_sdk/oidc_endpoints.rb', line 6 def token @token end |
Class Method Details
.from_config(config) ⇒ Object
20 21 22 |
# File 'lib/keycloak_sdk/oidc_endpoints.rb', line 20 def self.from_config(config) new(config.server_url, config.realm) end |