View Source ExOauth2Provider.AccessGrants (ExOauth2Provider v0.5.7)

The boundary for the OauthAccessGrants system.

Summary

Functions

Gets a single access grant registered with an application.

See ExOauth2Provider.Mixin.Revocable.revoke/2.

See ExOauth2Provider.Mixin.Revocable.revoke!/2.

Functions

Link to this function

create_grant(resource_owner, application, attrs, config \\ [])

View Source

Creates an access grant.

Examples

iex> create_grant(resource_owner, application, attrs)
{:ok, %OauthAccessGrant{}}

iex> create_grant(resource_owner, application, attrs)
{:error, %Ecto.Changeset{}}
Link to this function

get_active_grant_for(application, token, config \\ [])

View Source

Gets a single access grant registered with an application.

Examples

iex> get_active_grant_for(application, "jE9dk", otp_app: :my_app)
%OauthAccessGrant{}

iex> get_active_grant_for(application, "jE9dk", otp_app: :my_app)
** nil
Link to this function

revoke(data, config \\ [])

View Source

See ExOauth2Provider.Mixin.Revocable.revoke/2.

Link to this function

revoke!(data, config \\ [])

View Source

See ExOauth2Provider.Mixin.Revocable.revoke!/2.