pub struct IssueConfig { /* private fields */ }Expand description
Issuance configuration for an OIDC id_token.
Constructed via IssueConfig::id_token which pins typ="JWT",
cat="id", single-audience array, and the RP-supplied
Nonce. Multi-audience tokens replace the audience list via
with_audiences; hybrid + implicit flows add
the at_hash / c_hash binding inputs via
with_access_token_for_at_hash
and
with_authorization_code_for_c_hash.
Implementations§
Source§impl IssueConfig
impl IssueConfig
Sourcepub fn id_token(
issuer: impl Into<String>,
audience: impl Into<String>,
kid: impl Into<String>,
nonce: Nonce,
) -> Self
pub fn id_token( issuer: impl Into<String>, audience: impl Into<String>, kid: impl Into<String>, nonce: Nonce, ) -> Self
Build the canonical id_token config: JWT typ (the OIDC Core
canonical id-token type, distinct from access tokens’
RFC 9068 at+jwt), id cat (M29-mirror profile-routing
claim — see engine::check_id_token_cat), single-audience
array, and the RP-supplied Nonce. Multi-aud tokens add
audiences via with_audiences.
Sourcepub fn with_audiences(self, audiences: Vec<String>) -> Self
pub fn with_audiences(self, audiences: Vec<String>) -> Self
Replace the audience list. Engine emits the array form when
audiences.len() > 1, single string when length is 1 (RFC 9068
§3 — also valid for OIDC Core which silently delegates to JWT
rules). Empty audience list is a logic error — the engine refuses
to emit such a token at issuance time.
Sourcepub fn with_access_token_for_at_hash(
self,
access_token: impl Into<String>,
) -> Self
pub fn with_access_token_for_at_hash( self, access_token: impl Into<String>, ) -> Self
Bind the issued id_token to a specific access_token via M67
at_hash emission. The engine will compute
BASE64URL(SHA-256(access_token)[..16]) and embed it as the
at_hash claim. Required when the same response carries both the
id_token and the access_token; not called for pure code flow.
Bind the issued id_token to a specific authorization_code via M68
c_hash emission. The engine will compute
BASE64URL(SHA-256(code)[..16]) and embed it as the c_hash
claim. Required for hybrid flow responses; not called for
implicit-only.
Trait Implementations§
Source§impl Clone for IssueConfig
impl Clone for IssueConfig
Source§fn clone(&self) -> IssueConfig
fn clone(&self) -> IssueConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more