pub struct OidcAuthCodeUrlBuilder { /* private fields */ }
experimental-oidc
only.Expand description
Builder type used to configure optional settings for authorization with an OpenID Connect Provider via the Authorization Code flow.
Created with Oidc::login()
. Finalized with Self::build()
.
Implementations§
Source§impl OidcAuthCodeUrlBuilder
impl OidcAuthCodeUrlBuilder
Sourcepub fn prompt(self, prompt: Vec<Prompt>) -> Self
pub fn prompt(self, prompt: Vec<Prompt>) -> Self
Set the Prompt
of the authorization URL.
If this is not set, it is assumed that the user wants to log into an existing account.
Prompt::Create
can be used to signify that the user wants to
register a new account.
Sourcepub fn user_id_hint(self, user_id: &UserId) -> Self
pub fn user_id_hint(self, user_id: &UserId) -> Self
Set the hint to the Authorization Server about the Matrix user ID the End-User might use to log in, as defined in MSC4198.
Sourcepub async fn build(self) -> Result<OidcAuthorizationData, OidcError>
pub async fn build(self) -> Result<OidcAuthorizationData, OidcError>
Get the URL that should be presented to login via the Authorization Code flow.
This URL should be presented to the user and once they are redirected to
the redirect_uri
, the authorization can be completed by calling
Oidc::finish_authorization()
.
Returns an error if the client registration was not restored, or if a request fails.
Auto Trait Implementations§
impl Freeze for OidcAuthCodeUrlBuilder
impl !RefUnwindSafe for OidcAuthCodeUrlBuilder
impl Send for OidcAuthCodeUrlBuilder
impl Sync for OidcAuthCodeUrlBuilder
impl Unpin for OidcAuthCodeUrlBuilder
impl !UnwindSafe for OidcAuthCodeUrlBuilder
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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