CPub.User.Registration (CPub v0.3.0) View Source
CPub.User.Registration
models how a CPub.User
is registered and can
authenticate with CPub.
Currently there are three types of registration providers:
:internal
: A password that is stored in the CPub database.:oidc
: An external OpenID Connect identity provider:mastodon
: A server that implements the Mastodon OAuth protocol
Link to this section Summary
Functions
Check if password matches registered password.
Create an internal registration with a password.
Create an internal registration with a password.
Get the registration for a user.
Link to this section Types
Specs
Link to this section Functions
Specs
Check if password matches registered password.
Specs
create_external(CPub.User.t(), atom() | String.t(), String.t(), String.t()) :: {:ok, t()} | {:error, any()}
Create an internal registration with a password.
Specs
create_internal(CPub.User.t(), String.t()) :: {:ok, t()} | {:error, any()}
Create an internal registration with a password.
Specs
Specs
get_user_registration(CPub.User.t()) :: {:ok, t()} | {:error, any()}
Get the registration for a user.