Guardian.Hooks behaviour

This module helps to hook into the lifecycle of authentication.

Callbacks

before_encode_and_sign/3

Specs:

  • before_encode_and_sign(resource :: term, type :: atom, claims :: Map) :: term
after_encode_and_sign/4

Specs:

  • after_encode_and_sign(resource :: term, type :: atom, claims :: Map, token :: String.t) :: term
after_sign_in/2

Specs:

  • after_sign_in(conn :: Plug.Conn.t, location :: atom | nil) :: term
before_sign_out/2

Specs:

  • before_sign_out(conn :: Plug.Conn.t, location :: atom | nil) :: term
on_verify/2

Specs:

  • on_verify(claims :: Map, jwt :: String.t) :: term
on_revoke/2

Specs:

  • on_revoke(claims :: Map, jwt :: String.t) :: term