pub struct OidcClient { /* private fields */ }Implementations§
Source§impl OidcClient
impl OidcClient
pub fn new(config: OidcConfig, public_url: &str) -> Result<OidcClient>
Sourcepub async fn verify_logout_token(&self, token: &str) -> AppResult<String>
pub async fn verify_logout_token(&self, token: &str) -> AppResult<String>
Checks a back-channel logout token (signature with the provider’s keys, issuer, audience, age, logout event) and returns its subject. A token that does not pass is a bad request (400, as the specification asks).
pub fn display_name(&self) -> &str
Sourcepub async fn start_login(
&self,
pool: &PgPool,
return_to: &str,
) -> AppResult<String>
pub async fn start_login( &self, pool: &PgPool, return_to: &str, ) -> AppResult<String>
Starts a login and returns the URL to redirect the browser to.
Sourcepub async fn start_reauth(
&self,
pool: &PgPool,
return_to: &str,
session_hash: &str,
) -> AppResult<String>
pub async fn start_reauth( &self, pool: &PgPool, return_to: &str, session_hash: &str, ) -> AppResult<String>
Starts a fresh sign-in of the user of an existing web session (the
hash of its token) to confirm a review decision: the provider is
asked to authenticate again (prompt=login, max_age=0), and the
callback marks that session instead of opening a new one.
Sourcepub async fn finish_login(
&self,
pool: &PgPool,
code: &str,
state: &str,
) -> AppResult<(OidcIdentity, String, Option<String>)>
pub async fn finish_login( &self, pool: &PgPool, code: &str, state: &str, ) -> AppResult<(OidcIdentity, String, Option<String>)>
Completes a login. Returns the identity, the local page to return to
and – for a fresh sign-in started by Self::start_reauth – the hash
of the session to mark.
Auto Trait Implementations§
impl !Freeze for OidcClient
impl !RefUnwindSafe for OidcClient
impl !UnwindSafe for OidcClient
impl Send for OidcClient
impl Sync for OidcClient
impl Unpin for OidcClient
impl UnsafeUnpin for OidcClient
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> Parallelizable for T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.