TamaOAuth.Error exception (tama_oauth v0.1.0)

Copy Markdown View Source

A bounded OAuth protocol error independent of any HTTP framework.

Applications translate this value into redirects or JSON responses at their transport boundary. details is internal safe metadata and is never included by to_map/1.

Summary

Types

code()

@type code() ::
  :invalid_request
  | :invalid_client
  | :invalid_client_metadata
  | :invalid_redirect_uri
  | :invalid_grant
  | :invalid_target
  | :invalid_scope
  | :unsupported_grant_type
  | :temporarily_unavailable
  | :access_denied
  | :invalid_token
  | :insufficient_scope

t()

@type t() :: %TamaOAuth.Error{
  __exception__: true,
  code: code(),
  description: String.t() | nil,
  details: map(),
  stage: atom() | nil,
  status: pos_integer()
}

Functions

new(code, opts \\ [])

@spec new(
  code(),
  keyword()
) :: t()

to_map(error)

@spec to_map(t()) :: map()