Module: KeycloakOauth::Endpoints
- Included in:
- Connection
- Defined in:
- lib/keycloak_oauth/endpoints.rb
Constant Summary collapse
- DEFAULT_RESPONSE_TYPE =
'code'.freeze
Instance Method Summary collapse
- #authentication_endpoint ⇒ Object
- #authorization_endpoint(options: {}) ⇒ Object
- #logout_endpoint ⇒ Object
- #put_execute_actions_email_endpoint(user_id) ⇒ Object
- #user_info_endpoint ⇒ Object
- #users_endpoint ⇒ Object
Instance Method Details
#authentication_endpoint ⇒ Object
12 13 14 |
# File 'lib/keycloak_oauth/endpoints.rb', line 12 def authentication_endpoint "#{auth_url}/realms/#{realm}/protocol/openid-connect/token" end |
#authorization_endpoint(options: {}) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/keycloak_oauth/endpoints.rb', line 5 def (options: {}) endpoint = "#{auth_url}/realms/#{realm}/protocol/openid-connect/auth?client_id=#{client_id}" endpoint += "&response_type=#{[:response_type] || DEFAULT_RESPONSE_TYPE}" endpoint += "&redirect_uri=#{[:redirect_uri]}" if [:redirect_uri].present? endpoint end |
#logout_endpoint ⇒ Object
20 21 22 |
# File 'lib/keycloak_oauth/endpoints.rb', line 20 def logout_endpoint "#{auth_url}/realms/#{realm}/protocol/openid-connect/logout" end |
#put_execute_actions_email_endpoint(user_id) ⇒ Object
28 29 30 |
# File 'lib/keycloak_oauth/endpoints.rb', line 28 def put_execute_actions_email_endpoint(user_id) "#{auth_url}/admin/realms/#{realm}/users/#{user_id}/execute-actions-email" end |
#user_info_endpoint ⇒ Object
16 17 18 |
# File 'lib/keycloak_oauth/endpoints.rb', line 16 def user_info_endpoint "#{auth_url}/realms/#{realm}/protocol/openid-connect/userinfo" end |
#users_endpoint ⇒ Object
24 25 26 |
# File 'lib/keycloak_oauth/endpoints.rb', line 24 def users_endpoint "#{auth_url}/admin/realms/#{realm}/users" end |