pub struct AuthorizationRequestData {
pub client_id: String,
pub scope: Scope,
pub redirect_uri: Url,
pub code_challenge_methods_supported: Option<Vec<PkceCodeChallengeMethod>>,
pub display: Option<Display>,
pub prompt: Option<Vec<Prompt>>,
pub max_age: Option<NonZero<u32>>,
pub ui_locales: Option<Vec<LanguageTag>>,
pub id_token_hint: Option<String>,
pub login_hint: Option<String>,
pub acr_values: Option<HashSet<String>>,
}
experimental-oidc
only.Expand description
The data necessary to build an authorization request.
Fields§
§client_id: String
The ID obtained when registering the client.
scope: Scope
The scope to authorize.
If the OpenID Connect scope token (openid
) is not included, it will be
added.
redirect_uri: Url
The URI to redirect the end-user to after the authorization.
It must be one of the redirect URIs provided during registration.
code_challenge_methods_supported: Option<Vec<PkceCodeChallengeMethod>>
The PKCE methods supported by the issuer.
This field should be cloned from the provider metadata. If it is not set, this security measure will not be used.
display: Option<Display>
How the Authorization Server should display the authentication and consent user interface pages to the End-User.
prompt: Option<Vec<Prompt>>
Whether the Authorization Server should prompt the End-User for reauthentication and consent.
If Prompt::None
is used, it must be the only value.
max_age: Option<NonZero<u32>>
The allowable elapsed time in seconds since the last time the End-User was actively authenticated by the OpenID Provider.
ui_locales: Option<Vec<LanguageTag>>
End-User’s preferred languages and scripts for the user interface.
id_token_hint: Option<String>
ID Token previously issued by the Authorization Server being passed as a hint about the End-User’s current or past authenticated session with the Client.
login_hint: Option<String>
Hint to the Authorization Server about the login identifier the End-User might use to log in.
acr_values: Option<HashSet<String>>
Requested Authentication Context Class Reference values.
Implementations§
Source§impl AuthorizationRequestData
impl AuthorizationRequestData
Sourcepub fn new(
client_id: String,
scope: Scope,
redirect_uri: Url,
) -> AuthorizationRequestData
pub fn new( client_id: String, scope: Scope, redirect_uri: Url, ) -> AuthorizationRequestData
Constructs a new AuthorizationRequestData
with all the required
fields.
Sourcepub fn with_code_challenge_methods_supported(
self,
code_challenge_methods_supported: Vec<PkceCodeChallengeMethod>,
) -> AuthorizationRequestData
pub fn with_code_challenge_methods_supported( self, code_challenge_methods_supported: Vec<PkceCodeChallengeMethod>, ) -> AuthorizationRequestData
Set the code_challenge_methods_supported
field of this
AuthorizationRequestData
.
Sourcepub fn with_display(self, display: Display) -> AuthorizationRequestData
pub fn with_display(self, display: Display) -> AuthorizationRequestData
Set the display
field of this AuthorizationRequestData
.
Sourcepub fn with_prompt(self, prompt: Vec<Prompt>) -> AuthorizationRequestData
pub fn with_prompt(self, prompt: Vec<Prompt>) -> AuthorizationRequestData
Set the prompt
field of this AuthorizationRequestData
.
Sourcepub fn with_max_age(self, max_age: NonZero<u32>) -> AuthorizationRequestData
pub fn with_max_age(self, max_age: NonZero<u32>) -> AuthorizationRequestData
Set the max_age
field of this AuthorizationRequestData
.
Sourcepub fn with_ui_locales(
self,
ui_locales: Vec<LanguageTag>,
) -> AuthorizationRequestData
pub fn with_ui_locales( self, ui_locales: Vec<LanguageTag>, ) -> AuthorizationRequestData
Set the ui_locales
field of this AuthorizationRequestData
.
Sourcepub fn with_id_token_hint(
self,
id_token_hint: String,
) -> AuthorizationRequestData
pub fn with_id_token_hint( self, id_token_hint: String, ) -> AuthorizationRequestData
Set the id_token_hint
field of this AuthorizationRequestData
.
Sourcepub fn with_login_hint(self, login_hint: String) -> AuthorizationRequestData
pub fn with_login_hint(self, login_hint: String) -> AuthorizationRequestData
Set the login_hint
field of this AuthorizationRequestData
.
Sourcepub fn with_acr_values(
self,
acr_values: HashSet<String>,
) -> AuthorizationRequestData
pub fn with_acr_values( self, acr_values: HashSet<String>, ) -> AuthorizationRequestData
Set the acr_values
field of this AuthorizationRequestData
.
Trait Implementations§
Source§impl Clone for AuthorizationRequestData
impl Clone for AuthorizationRequestData
Source§fn clone(&self) -> AuthorizationRequestData
fn clone(&self) -> AuthorizationRequestData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for AuthorizationRequestData
impl RefUnwindSafe for AuthorizationRequestData
impl Send for AuthorizationRequestData
impl Sync for AuthorizationRequestData
impl Unpin for AuthorizationRequestData
impl UnwindSafe for AuthorizationRequestData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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