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<NonZeroU32>,
pub ui_locales: Option<Vec<LanguageTag>>,
pub id_token_hint: Option<String>,
pub login_hint: Option<String>,
pub acr_values: Option<HashSet<String>>,
}
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<NonZeroU32>
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) -> Self
pub fn new(client_id: String, scope: Scope, redirect_uri: Url) -> Self
Constructs a new AuthorizationRequestData
with all the required
fields.
sourcepub fn with_code_challenge_methods_supported(
self,
code_challenge_methods_supported: Vec<PkceCodeChallengeMethod>,
) -> Self
pub fn with_code_challenge_methods_supported( self, code_challenge_methods_supported: Vec<PkceCodeChallengeMethod>, ) -> Self
Set the code_challenge_methods_supported
field of this
AuthorizationRequestData
.
sourcepub fn with_display(self, display: Display) -> Self
pub fn with_display(self, display: Display) -> Self
Set the display
field of this AuthorizationRequestData
.
sourcepub fn with_prompt(self, prompt: Vec<Prompt>) -> Self
pub fn with_prompt(self, prompt: Vec<Prompt>) -> Self
Set the prompt
field of this AuthorizationRequestData
.
sourcepub fn with_max_age(self, max_age: NonZeroU32) -> Self
pub fn with_max_age(self, max_age: NonZeroU32) -> Self
Set the max_age
field of this AuthorizationRequestData
.
sourcepub fn with_ui_locales(self, ui_locales: Vec<LanguageTag>) -> Self
pub fn with_ui_locales(self, ui_locales: Vec<LanguageTag>) -> Self
Set the ui_locales
field of this AuthorizationRequestData
.
sourcepub fn with_id_token_hint(self, id_token_hint: String) -> Self
pub fn with_id_token_hint(self, id_token_hint: String) -> Self
Set the id_token_hint
field of this AuthorizationRequestData
.
sourcepub fn with_login_hint(self, login_hint: String) -> Self
pub fn with_login_hint(self, login_hint: String) -> Self
Set the login_hint
field of this AuthorizationRequestData
.
sourcepub fn with_acr_values(self, acr_values: HashSet<String>) -> Self
pub fn with_acr_values(self, acr_values: HashSet<String>) -> Self
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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> 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>
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