Lockspire. Protocol. RequestObject
(lockspire v1.6.1)
Copy Markdown
Orchestrates JAR (RFC 9101) request-object consumption for /authorize and /par.
Composes Lockspire.Protocol.Jar.{decode/1, verify_signature/2, validate_claims/2}
into a single pipeline step that:
- Rejects outer-parameter conflicts and
request/request_uricollisions. - Asserts the client has inline
jwksregistered. - Decodes, verifies the signature, and validates the request JWT claims with the
configured
:max_ageceiling. - Projects JAR claims into the flat authorization-parameter shape consumed by both authorization entrypoints, so their existing validation runs unchanged.
Out of scope
- JAR-by-reference (
request_uripointing to an external JWT URL) jwks_uriHTTP fetch- JAR substituting as client authentication at
/par - JTI replay cache
Summary
Types
@type result() :: {:ok, map()} | {:browser_error, Lockspire.Protocol.AuthorizationRequest.Error.t()} | {:redirect_error, Lockspire.Protocol.AuthorizationRequest.Error.t()}
Functions
@spec consume(map(), Lockspire.Domain.Client.t(), keyword()) :: result()