pub struct OidcAuthenticationEngine { /* private fields */ }Implementations§
Source§impl OidcAuthenticationEngine
impl OidcAuthenticationEngine
Sourcepub async fn new(
idp_url: Url,
redirect_url: Url,
client_id: String,
client_secret: String,
groups_claim: String,
) -> Result<Self, AuthenticationEngineError>
pub async fn new( idp_url: Url, redirect_url: Url, client_id: String, client_secret: String, groups_claim: String, ) -> Result<Self, AuthenticationEngineError>
Creates a new [OidcAuthenticationService] instance with the specified
projects_directory.
§Arguments
idp_url: The URL to the IdP service.redirect_url: The URL to which the IdP should redirect the user-agent after successful authentication.client_id: Theidof the application on the IdP.client_secret: The Authorization Code Flow client secret shared between the IdP and the application.groups_claim: The name of the OIDC claim containing and array of groups that a user is part of.
Trait Implementations§
Source§impl AuthenticationEngine for OidcAuthenticationEngine
impl AuthenticationEngine for OidcAuthenticationEngine
Called as part of the OIDC
/authorize endpoint.Source§fn callback<'life0, 'async_trait>(
&'life0 self,
callback_params: CallbackRequestParams,
persisted_data: OidcSessionPersisted,
) -> Pin<Box<dyn Future<Output = Result<User, AuthenticationEngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn callback<'life0, 'async_trait>(
&'life0 self,
callback_params: CallbackRequestParams,
persisted_data: OidcSessionPersisted,
) -> Pin<Box<dyn Future<Output = Result<User, AuthenticationEngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
After authentication, the IdP would redirect the user agent to the
callback route. This would handle the finalizing the OIDC flow to return
the validated user. Read more
Source§impl Clone for OidcAuthenticationEngine
impl Clone for OidcAuthenticationEngine
Auto Trait Implementations§
impl Freeze for OidcAuthenticationEngine
impl RefUnwindSafe for OidcAuthenticationEngine
impl Send for OidcAuthenticationEngine
impl Sync for OidcAuthenticationEngine
impl Unpin for OidcAuthenticationEngine
impl UnsafeUnpin for OidcAuthenticationEngine
impl UnwindSafe for OidcAuthenticationEngine
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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 more