pub struct Completion<S: ScopePiiReader> {
pub id_assertion: IdAssertion<S>,
pub tokens: TokenResponse,
pub redirect_to: RelativePath,
}Expand description
Verified OIDC authentication outcome.
[super::RelyingParty::complete] returns this; the consumer’s
callback_handler typically: (1) issues session cookies from
tokens (encrypting refresh_token via [crate::TokenCipher]),
(2) redirects to redirect_to (the after_login captured at
start time).
id_assertion is the verified identity (sub, iss, aud, exp, iat,
nonce, plus scope-bounded PII gated by S). tokens is the raw
OAuth response (access_token + refresh_token + expires_in).
redirect_to is the RelativePath round-tripped from start.
Scope narrowing carries through to id_assertion: a
Completion<scopes::Openid> cannot reach email() even via the
public id_assertion field, because IdAssertion::email itself
requires the HasEmail bound on S.
ⓘ
use pas_external::oidc::{Completion, Openid};
fn _compile_fail(c: &Completion<Openid>) -> &str {
c.id_assertion.email() // ERROR: method `email` requires `HasEmail`
}Fields§
§id_assertion: IdAssertion<S>§tokens: TokenResponse§redirect_to: RelativePathTrait Implementations§
Auto Trait Implementations§
impl<S> Freeze for Completion<S>
impl<S> RefUnwindSafe for Completion<S>where
S: RefUnwindSafe,
impl<S> Send for Completion<S>
impl<S> Sync for Completion<S>
impl<S> Unpin for Completion<S>where
S: Unpin,
impl<S> UnsafeUnpin for Completion<S>
impl<S> UnwindSafe for Completion<S>where
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more