Pow.Plug.MessageVerifier behaviour (Pow v1.0.22) View Source
This module can sign and verify messages.
Based on Phoenix.Token.
Link to this section Summary
Link to this section Functions
Specs
sign(Plug.Conn.t(), binary(), binary(), keyword()) :: binary()
Signs a message.
Plug.Crypto.MessageVerifier.sign/2 is used. The secret is derived from the
salt and conn.secret_key_base using
Plug.Crypto.KeyGenerator.generate/3. If :key_generator_opts is set in the
config, this will be passed on to Plug.Crypto.KeyGenerator.
Specs
verify(Plug.Conn.t(), binary(), binary(), keyword()) :: {:ok, binary()} | :error
Verifies a message.
Plug.Crypto.MessageVerifier.sign/2 is used. The secret is derived from the
salt and conn.secret_key_base using
Plug.Crypto.KeyGenerator.generate/3. If :key_generator_opts is set in the
config, this will be passed on to Plug.Crypto.KeyGenerator.
Link to this section Callbacks
Specs
sign(Plug.Conn.t(), binary(), binary(), keyword()) :: binary()
Specs
verify(Plug.Conn.t(), binary(), binary(), keyword()) :: {:ok, binary()} | :error