CoherenceAssent v0.2.3 CoherenceAssent.UserIdentities View Source

The boundary for the UserIdentities system.

Link to this section Summary

Functions

Creates a new user identity

Deletes identity from user

Gets a single access grant registered with an application

Link to this section Functions

Link to this function create_identity(user, provider, uid) View Source

Creates a new user identity.

Examples

iex> create_identity(user, "github", 1)
{:ok, %UserIdentity{}}

iex> create_identity(user, "github", 1)
{:error, %Ecto.Changeset{}}
Link to this function delete_identity_from_user(map, provider) View Source

Deletes identity from user.

Examples

iex> delete_identity_from_user(user, "github", 1)
{:ok, %UserIdentity{}}

iex> delete_identity_from_user(user, "github", 0)
{:error, %Ecto.Changeset{}}
Link to this function get_user_from_identity_params(provider, uid) View Source

Gets a single access grant registered with an application.

Examples

iex> get_user_from_identity_params("github", "uid")
%User{}

iex> get_user_from_identity_params("github", "invalid_uid")
** nil