Karta.Accounts.User (Karta v1.0.0)

A person who signs in: normally through the OpenID Connect provider (oidc_subject is the provider's sub), which can create users on their first sign-in; with local login turned on, also with a password and a TOTP code. admin users administer the whole instance. A user with disabled_at set cannot sign in, and their sessions end.

Summary

Functions

Only these fields can come from user input; everything else is set by the context.

A new password chosen by the user: 12 to 128 characters, given twice (password, password_confirmation); stored as its hash only.

Types

t()

@type t() :: %Karta.Accounts.User{
  __meta__: term(),
  admin: term(),
  disabled_at: term(),
  email: term(),
  id: term(),
  inserted_at: term(),
  memberships: term(),
  name: term(),
  oidc_subject: term(),
  password: term(),
  password_hash: term(),
  signed_in_at: term(),
  totp_last_step: term(),
  totp_secret: term(),
  updated_at: term()
}

Functions

changeset(user, attrs)

Only these fields can come from user input; everything else is set by the context.

password_changeset(user, attrs)

A new password chosen by the user: 12 to 128 characters, given twice (password, password_confirmation); stored as its hash only.