Snap.Auth behaviour (Snap v0.2.2) View Source

Defines how HTTP request is transformed to add authentication.

Link to this section Summary

Callbacks

Modifies an HTTP request to include authentication details

Link to this section Types

Specs

body() :: iodata()

Specs

config() :: Keyword.t()

Specs

headers() :: Mint.Types.headers()

Specs

method() :: String.t()

Specs

opts() :: Keyword.t()

Specs

response() :: {:ok, {method(), url(), headers(), body()}} | {:error, term()}

Specs

url() :: String.t()

Link to this section Callbacks

Link to this callback

sign(config, method, url, headers, body)

View Source

Specs

sign(config(), method(), url(), headers(), body()) :: response()

Modifies an HTTP request to include authentication details