PlugHmacAuth v0.1.0 PlugHmacAuth View Source
PlugHmacAuth provides a Plug for HMAC authentication.
Link to this section Summary
Functions
Callback implementation for Plug.call/2.
Returns the first token from http request header by specific key.
Returns signatre generated by payload and secret key.
Callback implementation for Plug.init/1.
Link to this section Types
Specs
Link to this section Functions
Specs
call(Plug.Conn.t(), Keyword.t()) :: Plug.Conn.t()
Callback implementation for Plug.call/2.
Specs
fetch_token_from_header(Plug.Conn.t(), binary()) :: {:error, :invalid_key} | {:ok, binary()}
Returns the first token from http request header by specific key.
Specs
Returns signatre generated by payload and secret key.
Specs
get_payload(Plug.Conn.t()) :: String.t()
Specs
Callback implementation for Plug.init/1.
Link to this function
verify_payload(conn, secret_key, access_signature, hmac_hash_algo)
View SourceSpecs
verify_payload( Plug.Conn.t(), String.t(), String.t(), :md4 | :md5 | :sha | :sha224 | :sha256 | :sha384 | :sha3_224 | :sha3_256 | :sha3_384 | :sha3_512 | :sha512 ) :: :ok | {:error, :invalid_signature}