PowAssent v0.1.0 PowAssent.Operations View Source

Operation methods that glues operation calls to context module.

A custom context module can be used instead of the default PowAssent.Ecto.UserIdentities.Context if a :user_identities_context key is passed in the configuration.

Link to this section Summary

Functions

Lists all user identity associations for user

Creates user identity for the user and strategy provider name and uid

Creates user with user identity with the provided user params

Deletes the user identity for user and strategy provider name

Retrieve a user with the strategy provider name and uid

Link to this section Functions

Lists all user identity associations for user.

This calls Pow.Ecto.UserIdentities.Context.all/2 or all/1 on a custom context module.

Link to this function create(user, provider, uid, config) View Source
create(map(), binary(), binary(), PowAssent.Config.t()) ::
  {:ok, map()}
  | {:error, {:bound_to_different_user, map()}}
  | {:error, map()}
  | no_return()

Creates user identity for the user and strategy provider name and uid.

This calls Pow.Ecto.UserIdentities.Context.create/4 or create/3 on a custom context module.

Link to this function create_user(provider, uid, params, user_id_params, config) View Source
create_user(binary(), binary(), map(), map(), PowAssent.Config.t()) ::
  {:ok, map()}
  | {:error, {:bound_to_different_user | :invalid_user_id_field, map()}}
  | {:error, map()}
  | no_return()

Creates user with user identity with the provided user params.

This calls Pow.Ecto.UserIdentities.Context.create_user/5 or create_user/4 on a custom context module.

Link to this function delete(user, provider, config) View Source
delete(map(), binary(), PowAssent.Config.t()) ::
  {:ok, {number(), nil}} | {:error, {:no_password, map()}} | no_return()

Deletes the user identity for user and strategy provider name.

This calls Pow.Ecto.UserIdentities.Context.delete/3 or delete/2 on a custom context module.

Link to this function get_user_by_provider_uid(provider, uid, config) View Source
get_user_by_provider_uid(binary(), binary(), PowAssent.Config.t()) ::
  map() | nil | no_return()

Retrieve a user with the strategy provider name and uid.

This calls Pow.Ecto.UserIdentities.Context.get_user_by_provider_uid/3 or get_user_by_provider_uid/2 on a custom context module.