ExOauth2Provider v0.2.1 API Reference

Modules

A module that provides OAuth 2 capabilities for Elixir applications

Handler for dealing with generating access grants

Methods for authorization code flow

The boundary for the OauthAccessGrants system

Ecto schema for oauth access tokens

The boundary for the OauthApplications system

ExOauth2Provider.Plug contains functions that assist with interacting with ExOauth2Provider via Plugs

This plug ensures that the request has been authenticated with an access token

Use this plug to ensure that there are the correct scopes on the token found on the connection

A default error handler that can be used for failed authentication

Use this plug to authenticate a token contained in the header. You should set the value of the Authorization header to:

Authorization: <token>

Functions for dealing with redirect uri

Functions for dealing with scopes

Handler for dealing with generating access tokens

Functions for dealing with authorization code strategy

Functions for dealing with client credentials strategy

Functions for dealing with refresh token strategy

Functions for dealing with refresh token strategy

Functions for dealing with revocation

Mix Tasks

Prints ExOauth2Provider tasks and their information.

mix ex_oauth2_provider

Generates migrations. The repository must be set under :ecto_repos in the current app configuration or given via the -r option.

Example

mix ex_oauth2_provider.install

By default, the migration will be generated to the “priv/YOUR_REPO/migrations” directory of the current application but it can be configured to be any subdirectory of priv by specifying the :priv key under the repository configuration.

Command line options

  • -r, --repo - the repo to generate migration for
  • --config-file - the configuration file to update
  • --resource-owner - defines the resource owner, default is MyApp.User
  • --no-config — Don’t append to your config/config.exs file.
  • --no-migrations — Don’t add migrations