module Auth0::Api::AuthenticationEndpoints
{auth0.com/docs/auth-api} Describing functionality of auth0 authentication endpoints
Public Instance Methods
change_password(email, password, connection_name = "Username-Password-Authentication")
click to toggle source
{auth0.com/docs/auth-api#!#post–dbconnections-change_password}
# File lib/auth0/api/authentication_endpoints.rb, line 54 def change_password(email, password, connection_name = "Username-Password-Authentication") request_params = { client_id: @client_id, email: email, connection: connection_name, password: password } post("/dbconnections/change_password", request_params) end
delegation(id_token, target, scope = "open_id")
click to toggle source
{auth0.com/docs/auth-api#!#post–delegation}
# File lib/auth0/api/authentication_endpoints.rb, line 17 def delegation(id_token, target, scope = "open_id") request_params = { client_id: @client_id, grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer", id_token: id_token, target: target, scope: scope } post("/delegation", request_params) end
login(username, password, scope = "openid", id_token=nil, connection_name="Username-Password-Authentication")
click to toggle source
{auth0.com/docs/auth-api#!#post–oauth-ro}
# File lib/auth0/api/authentication_endpoints.rb, line 29 def login(username, password, scope = "openid", id_token=nil, connection_name="Username-Password-Authentication") request_params = { client_id: @client_id, username: username, password: password, scope: scope, connection: connection_name, grand_type: "password", id_token: id_token } post("/oauth/ro", request_params) end
obtain_access_token()
click to toggle source
{auth0.com/docs/auth-api#!#post–oauth-access_token}
# File lib/auth0/api/authentication_endpoints.rb, line 7 def obtain_access_token request_params = { client_id: @client_id, client_secret: @client_secret, grant_type: 'client_credentials' } post("/oauth/token", request_params)["access_token"] end
signup(email, password, connection_name= "Username-Password-Authentication")
click to toggle source
{auth0.com/docs/auth-api#!#post–dbconnections-signup}
# File lib/auth0/api/authentication_endpoints.rb, line 43 def signup(email, password, connection_name= "Username-Password-Authentication") request_params = { client_id: @client_id, email: email, connection: connection_name, password: password } post("/dbconnections/signup", request_params) end
token_info(id_token)
click to toggle source
{auth0.com/docs/auth-api#!#post–tokeninfo}
# File lib/auth0/api/authentication_endpoints.rb, line 65 def token_info(id_token) request_params = { id_token: id_token} post("/tokeninfo", request_params) end