Conn-free OAuth 2.0 / OIDC authorization-endpoint core.
Owns request resolution (PAR references and Request Objects), client lookup
(registered and CIMD), request validation, effective scope & post-scope nonce
checks (OIDC Core §3.1.2.1), authentication freshness checks (max_age and
prompt=login), resource authorization (RFC 8707), PAR single-use claim,
authorization-code claims/issuance, and response construction across query,
form_post, and JARM modes.
Summary
Functions
Authorize requested RFC 8707 resource indicators for the client.
Apply the authenticated principal's policy before consent and code issuance.
Assemble code claims including optional host :authorization_code_private_context.
Compute normalized response delivery parameters across query, form_post, and JARM modes.
Verify the authentication event's auth_time against max_age (OIDC Core §3.1.2.1).
Verify that prompt=login produced a fresh authentication event.
Atomically claim a resolved PAR request_uri prior to issuing a code.
Resolve credential configuration identifiers from the effective authorized request.
Map a host issuance refusal error to the RFC 6749 §4.1.2.1 redirect error code.
Issue an authorization code, invoking :authorization_code_issuance continuation if configured.
Validate, resolve, and scope-authorize an authorization request.
Inspect query/body request parameters (excluding router path parameters) for interaction resumption.
Functions
@spec authorize_request_resource( AttestoPhoenix.Config.t(), term(), Attesto.AuthorizationRequest.t() ) :: :ok | {:error, :invalid_target}
Authorize requested RFC 8707 resource indicators for the client.
@spec authorize_subject_scope( AttestoPhoenix.Config.t(), term(), map(), Attesto.AuthorizationRequest.t() ) :: {:ok, Attesto.AuthorizationRequest.t()} | {:error, :invalid_scope | :invalid_target}
Apply the authenticated principal's policy before consent and code issuance.
@spec build_code_claims( AttestoPhoenix.Config.t(), Attesto.AuthorizationRequest.t(), map(), map(), term(), String.t() ) :: {:ok, map()} | {:error, term()}
Assemble code claims including optional host :authorization_code_private_context.
@spec build_response( AttestoPhoenix.Config.t(), String.t(), String.t() | nil, String.t() | nil, map() ) :: {:redirect, String.t()} | {:form_post, String.t(), [{String.t(), String.t()}]} | {:bad_form_post_uri, String.t()}
Compute normalized response delivery parameters across query, form_post, and JARM modes.
@spec check_authentication_age( Attesto.AuthorizationRequest.t(), map(), map() | nil, boolean(), integer() ) :: :ok | {:error, :auth_time_required | :invalid_auth_time | :max_age_exceeded}
Verify the authentication event's auth_time against max_age (OIDC Core §3.1.2.1).
@spec check_prompt_login( Attesto.AuthorizationRequest.t(), map(), integer(), map() | nil, integer() ) :: {:ok, integer()} | {:error, atom()}
Verify that prompt=login produced a fresh authentication event.
@spec claim_par_request_uri(AttestoPhoenix.Config.t(), String.t() | nil) :: :ok | :error
Atomically claim a resolved PAR request_uri prior to issuing a code.
@spec credential_configuration_ids( AttestoPhoenix.Config.t(), Attesto.AuthorizationRequest.t() ) :: map()
Resolve credential configuration identifiers from the effective authorized request.
@spec issuance_refusal_code( AttestoPhoenix.OAuthError.t(), Attesto.AuthorizationRequest.t() ) :: String.t()
Map a host issuance refusal error to the RFC 6749 §4.1.2.1 redirect error code.
@spec issue_code(AttestoPhoenix.Config.t(), map()) :: {:ok, String.t()} | {:error, term()}
Issue an authorization code, invoking :authorization_code_issuance continuation if configured.
@spec prepare_request(AttestoPhoenix.Config.t(), map(), map() | nil) :: {:ok, %{ client: term(), request: Attesto.AuthorizationRequest.t(), dpop_jkt: String.t() | nil, par_request_uri: String.t() | nil, credential_configuration_ids: map() }} | {:error, term()}
Validate, resolve, and scope-authorize an authorization request.
@spec resume_params_status(map()) :: {:resume, String.t()} | :fresh | {:error, :resume_with_parameters}
Inspect query/body request parameters (excluding router path parameters) for interaction resumption.