pub struct OAuthAuthCodeUrlBuilder { /* private fields */ }
Expand description
Builder type used to configure optional settings for authorization with an OAuth 2.0 authorization server via the Authorization Code flow.
Created with OAuth::login()
. Finalized with Self::build()
.
Implementations§
Source§impl OAuthAuthCodeUrlBuilder
impl OAuthAuthCodeUrlBuilder
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<OAuthAuthorizationData, OAuthError>
pub async fn build(self) -> Result<OAuthAuthorizationData, OAuthError>
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 login can be completed by calling
OAuth::finish_login()
.
Returns an error if the client registration was not restored, or if a request fails.
Auto Trait Implementations§
impl Freeze for OAuthAuthCodeUrlBuilder
impl !RefUnwindSafe for OAuthAuthCodeUrlBuilder
impl Send for OAuthAuthCodeUrlBuilder
impl Sync for OAuthAuthCodeUrlBuilder
impl Unpin for OAuthAuthCodeUrlBuilder
impl !UnwindSafe for OAuthAuthCodeUrlBuilder
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, 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