Packages
attesto_phoenix
0.13.2
2.1.0
2.0.2
2.0.1
2.0.0
1.4.0
1.3.0
1.2.0
1.1.0
1.0.0
0.20.0
0.19.1
0.19.0
0.18.0
0.17.0
0.16.0
0.15.0
0.14.2
0.14.1
0.14.0
0.13.5
0.13.4
0.13.3
0.13.2
0.13.1
0.13.0
0.12.0
0.11.0
0.10.0
0.9.5
0.9.4
0.9.3
0.9.2
0.9.1
0.9.0
0.8.0
0.7.7
0.7.6
0.7.5
0.7.4
0.7.3
0.7.2
0.7.1
0.7.0
0.6.23
0.6.22
0.6.21
0.6.20
0.6.19
0.6.18
0.6.17
0.6.16
0.6.15
0.6.14
0.6.13
0.6.12
0.6.11
0.6.10
0.6.9
0.6.8
0.6.7
0.6.6
0.6.5
0.6.4
0.6.3
0.6.2
0.6.1
0.6.0
Phoenix/Ecto OAuth 2.0 / OIDC authorization server layer over attesto: authorization, token, PAR, revocation, discovery, JWKS, UserInfo, protected-resource plugs, and Ecto-backed token stores.
Current section
Files
Jump to
Current section
Files
lib/attesto_phoenix/authorization_server/par/request.ex
defmodule AttestoPhoenix.AuthorizationServer.PAR.Request do
@moduledoc """
A parsed Pushed Authorization Request (RFC 9126), all plain data lifted at
the controller edge.
`AttestoPhoenix.Controller.PARController` authenticates the client
(RFC 6749 §2.3), parses the request body and the relevant `Plug.Conn` facts,
and builds this struct so that `AttestoPhoenix.AuthorizationServer.PAR` can
store the request against data only - never a conn.
## Fields
* `:client` - the authenticated client (RFC 6749 §2.3), opaque to the core.
The stored record's `client_id` is resolved from it through the host's
`:client_id` callback, never trusted from the request body.
* `:params` - the submitted authorization request parameters (RFC 9126 §2.1
/ RFC 6749 §4.1.1). Client-authentication credentials are stripped before
storage; everything else is kept opaque for the authorization endpoint to
validate when the `request_uri` is later resolved.
* `:dpop_input` - the conn-free DPoP facts the controller lifts off the
request: the presented `DPoP` request-header value(s) (RFC 9449 §4.1), and
the canonical request URL/method the proof is bound to (RFC 9449 §4.2 /
§4.3). See `t:AttestoPhoenix.AuthorizationServer.PAR.dpop_input/0`.
"""
alias AttestoPhoenix.AuthorizationServer.PAR
@type t :: %__MODULE__{
client: term(),
params: map(),
dpop_input: PAR.dpop_input()
}
@enforce_keys [:client, :params, :dpop_input]
defstruct [:client, :params, :dpop_input]
end