Skip to main content

IssueConfig

Struct IssueConfig 

Source
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

Source

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.

Source

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.

Source

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.

Source

pub fn with_authorization_code_for_c_hash(self, code: impl Into<String>) -> Self

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

Source§

fn clone(&self) -> IssueConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for IssueConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more