pub struct ExternalAuthClientBuilder { /* private fields */ }Expand description
Builder for constructing an ExternalAuthClient.
Implementations§
Source§impl ExternalAuthClientBuilder
impl ExternalAuthClientBuilder
Sourcepub fn new(
base_url: impl Into<String>,
client_id: impl Into<String>,
client_secret: impl Into<String>,
redirect_uri: impl Into<String>,
login_url: impl Into<String>,
) -> Self
pub fn new( base_url: impl Into<String>, client_id: impl Into<String>, client_secret: impl Into<String>, redirect_uri: impl Into<String>, login_url: impl Into<String>, ) -> Self
Create a builder for an external auth client.
base_url: allowthem server URL (e.g.,"https://auth.wavefunk.io")client_id: OAuth client ID from the application registryclient_secret: OAuth client secretredirect_uri: the consuming project’s OIDC callback URLlogin_url: local path to redirect unauthenticated users (e.g.,"/auth/login")
Override session cookie name. Default: "allowthem_session".
Sourcepub fn scopes(self, scopes: impl Into<String>) -> Self
pub fn scopes(self, scopes: impl Into<String>) -> Self
Override requested scopes. Default: "openid profile email".
Sourcepub fn build(self) -> ExternalAuthClient
pub fn build(self) -> ExternalAuthClient
Build the client. Fetches JWKS on first use, not at build time.
Auto Trait Implementations§
impl Freeze for ExternalAuthClientBuilder
impl RefUnwindSafe for ExternalAuthClientBuilder
impl Send for ExternalAuthClientBuilder
impl Sync for ExternalAuthClientBuilder
impl Unpin for ExternalAuthClientBuilder
impl UnsafeUnpin for ExternalAuthClientBuilder
impl UnwindSafe for ExternalAuthClientBuilder
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> 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