View Source ArkeAuth.Core.User (arke_auth v0.1.14)

Documentation for User.

Link to this section Summary

Link to this section Functions

Link to this function

after_get_struct(arke, struct)

View Source
Link to this function

after_get_struct(arke, unit, struct)

View Source
Link to this function

before_create(arke, unit)

View Source
Link to this function

before_delete(arke, unit)

View Source
Link to this function

before_struct_encode(_, unit)

View Source
Link to this function

before_update(arke, unit)

View Source
Link to this function

before_validate(arke, unit)

View Source
Link to this function

check_password(user, pwd)

View Source
@spec check_password(user :: ArkeAuth.Core.Unit.t(), pwd :: String.t()) ::
  {:ok, ArkeAuth.Core.Unit.t()} | Arke.Utils.ErrorGenerator.t()

Check if the given password is right

parameters

Parameters

  • user => %Arke.Core.Unit{} => user struct
  • pwd => string => password to check

return

Return

{:ok, %Arke.Core.Unit{}}
Link to this function

on_load(data, persistence_fn)

View Source
Link to this function

on_struct_encode(_, _, data, opts)

View Source
Link to this function

on_update(arke, old_unit, unit)

View Source
Link to this function

update_password(user, new_pwd)

View Source
@spec update_password(user :: ArkeAuth.Core.Unit.t(), new_pwd :: String.t()) ::
  {:ok, ArkeAuth.Core.Unit.t()} | Arke.Utils.ErrorGenerator.t()

Update the user password

parameters

Parameters

  • user => %Arke.Core.Unit{} => user struct
  • new_pwd => string => password to check

return

Return

{:ok, %Arke.Core.Unit{}}