Hora v1.0.0 Hora.Adapter behaviour

Specifies the API an adapter is required to implement.

Link to this section Summary

Callbacks

Initializes the adapter

Secures the password. This will most likely be by either hashing or encrypting the password provided

Verifies that the plain text password and the secure password match

Link to this section Callbacks

Link to this callback init(opts)
init(opts :: Hora.opts) :: Hora.opts

Initializes the adapter.

The options returned from this function will be given to verify_password/3 and secure_password/2.

Link to this callback secure_password(password, opts)
secure_password(password :: String.t, opts :: Hora.opts) :: String.t

Secures the password. This will most likely be by either hashing or encrypting the password provided.

Link to this callback verify_password(password, crypted_password, opts)
verify_password(password :: String.t, crypted_password :: String.t, opts :: Hora.opts) :: boolean

Verifies that the plain text password and the secure password match.