module KeycloakOauth::Endpoints

Constants

DEFAULT_RESPONSE_TYPE

Public Instance Methods

authentication_endpoint() click to toggle source
# File lib/keycloak_oauth/endpoints.rb, line 12
def authentication_endpoint
  "#{auth_url}/realms/#{realm}/protocol/openid-connect/token"
end
authorization_endpoint(options: {}) click to toggle source
# File lib/keycloak_oauth/endpoints.rb, line 5
def authorization_endpoint(options: {})
  endpoint = "#{auth_url}/realms/#{realm}/protocol/openid-connect/auth?client_id=#{client_id}"
  endpoint += "&response_type=#{options[:response_type] || DEFAULT_RESPONSE_TYPE}"
  endpoint += "&redirect_uri=#{options[:redirect_uri]}" if options[:redirect_uri].present?
  endpoint
end
logout_endpoint() click to toggle source
# 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) click to toggle source
# 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() click to toggle source
# File lib/keycloak_oauth/endpoints.rb, line 16
def user_info_endpoint
  "#{auth_url}/realms/#{realm}/protocol/openid-connect/userinfo"
end
users_endpoint() click to toggle source
# File lib/keycloak_oauth/endpoints.rb, line 24
def users_endpoint
  "#{auth_url}/admin/realms/#{realm}/users"
end