ExOauth2Provider v0.5.0 ExOauth2Provider.AccessGrants View Source

The boundary for the OauthAccessGrants system.

Link to this section Summary

Functions

Gets a single access grant registered with an application.

See ExOauth2Provider.Mixin.Revocable.revoke/2.

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

Link to this section 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",)
%OauthAccessGrant{}

iex> get_active_grant_for(application, "jE9dk")
** 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.