auth0_ex v0.3.1 Auth0Ex.Authentication.Token View Source

A moodule for getting tokens for authentication. This is the module that gives you auth codes and client credentials.

More information at this page

Link to this section Summary

Functions

This is the OAuth 2.0 grant that regular web apps utilize in order to access an API. Use this endpoint to exchange an Authorization Code for a Token.

This is the OAuth 2.0 grant that mobile apps utilize in order to access an API. Use this endpoint to exchange an Authorization Code for a Token.

This is the OAuth 2.0 grant that server processes utilize in order to access an API. Use this endpoint to directly request an access_token by using the Client Credentials (a Client Id and a Client Secret).

Link to this section Functions

Link to this function

auth_code(client_id, client_secret, code, redirect_uri \\ nil) View Source

This is the OAuth 2.0 grant that regular web apps utilize in order to access an API. Use this endpoint to exchange an Authorization Code for a Token.

iex> Auth0Ex.Authentication.Token.auth_code("client_id", "client_secret", "code")
iex> Auth0Ex.Authentication.Token.auth_code("client_id", "client_secret", "code", "redirect_uri_here")
Link to this function

auth_code_pkce(client_id, client_secret, code, code_verifier, redirect_uri \\ nil) View Source

This is the OAuth 2.0 grant that mobile apps utilize in order to access an API. Use this endpoint to exchange an Authorization Code for a Token.

iex> Auth0Ex.Authentication.Token.auth_code_pkce("client_id", "client_secret", "code", "code_verifier")
iex> Auth0Ex.Authentication.Token.auth_code_pkce("client_id", "client_secret", "code", "code_verifier", "redirect_uri_here")
Link to this function

client_credentials(client_id, client_secret, audience) View Source

This is the OAuth 2.0 grant that server processes utilize in order to access an API. Use this endpoint to directly request an access_token by using the Client Credentials (a Client Id and a Client Secret).

iex> Auth0Ex.Authentication.Token.client_credentials("client_id", "client_secret", "API_IDENTIFIER_aud")