Pike.Responder behaviour (pike v0.1.0)

View Source

Behaviour for handling authorization failures in Pike.

Implement this module if you want to customize how Pike responds when authentication or authorization fails.

Summary

Types

Reasons for authentication or authorization failure

Types

reason()

@type reason() ::
  :missing_key
  | :invalid_format
  | :not_found
  | :disabled
  | :expired
  | :unauthorized_resource
  | :unauthorized_action
  | :store_error

Reasons for authentication or authorization failure

Callbacks

auth_failed(t, reason)

@callback auth_failed(Plug.Conn.t(), reason()) :: Plug.Conn.t()