BoundedAuthorityProtocol. V1. ExpectedRequest
(Bounded Authority Protocol v1.0.0)
Copy Markdown
View Source
Explicit expected context for combined raw-envelope verification.
Every value here comes from the caller's own request handling and records, never from the credentials being checked. The same struct serves contract-majors 1, 2 and 3 and the local-loopback HTTP profile (which requires a nonce).
Fields
trusted_issuer- theBoundedAuthorityProtocol.V1.TrustedIssueryour service already trusts.issuer- the expected grantiss, compared byte-for-byte.audience- one audience your service answers to; the grant'saudmust contain it.method- the request method as received, compared byte-for-byte (never case-normalized).target_uri- the request target as your server derives it, already in normal form (BoundedAuthorityProtocol.V1.Uri.normalize/2).invocation_id- the lowercase RFC 4122 UUID your service assigned to this invocation.operation- the operation name the request performs.cast_arguments- the typed arguments your server derived from the request, as a taggedBoundedAuthorityProtocol.V1.Json.value(); every selector of the operation must accept them. Redacted byinspect/2.evaluation_time- the caller's current time, integer Unix time in seconds; the library reads no clock.clock_skew- the tolerated clock skew in seconds,0toclock_skew(60).proof_max_age- the maximum proof age in seconds,1toproof_max_age(300).nonce-:not_required(the proof must carry no nonce) or{:required, nonce}(the proof must carry exactlynonce). The nonce is redacted byinspect/2.bounds- aBoundedAuthorityProtocol.V1.Boundsstruct or a map of tightening overrides;%{}means the profile maxima (seeBoundedAuthorityProtocol.V1.Bounds.coerce/1).
Summary
Types
Expected context for the façade's check_envelope/2 (for example BoundedAuthorityProtocol.V1.check_envelope/2).
Types
@type t() :: %BoundedAuthorityProtocol.V1.ExpectedRequest{ audience: binary(), bounds: BoundedAuthorityProtocol.V1.Bounds.t() | map(), cast_arguments: BoundedAuthorityProtocol.V1.Json.value(), clock_skew: non_neg_integer(), evaluation_time: integer(), invocation_id: binary(), issuer: binary(), method: binary(), nonce: :not_required | {:required, binary()}, operation: binary(), proof_max_age: pos_integer(), target_uri: binary(), trusted_issuer: BoundedAuthorityProtocol.V1.TrustedIssuer.t() }
Expected context for the façade's check_envelope/2 (for example BoundedAuthorityProtocol.V1.check_envelope/2).