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>>,
    pub response_mode: Option<ResponseMode>,
}
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.

§response_mode: Option<ResponseMode>

Requested response mode.

Implementations§

source§

impl AuthorizationRequestData

source

pub fn new(client_id: String, scope: Scope, redirect_uri: Url) -> Self

Constructs a new AuthorizationRequestData with all the required fields.

source

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.

source

pub fn with_display(self, display: Display) -> Self

Set the display field of this AuthorizationRequestData.

source

pub fn with_prompt(self, prompt: Vec<Prompt>) -> Self

Set the prompt field of this AuthorizationRequestData.

source

pub fn with_max_age(self, max_age: NonZeroU32) -> Self

Set the max_age field of this AuthorizationRequestData.

source

pub fn with_ui_locales(self, ui_locales: Vec<LanguageTag>) -> Self

Set the ui_locales field of this AuthorizationRequestData.

source

pub fn with_id_token_hint(self, id_token_hint: String) -> Self

Set the id_token_hint field of this AuthorizationRequestData.

source

pub fn with_login_hint(self, login_hint: String) -> Self

Set the login_hint field of this AuthorizationRequestData.

source

pub fn with_acr_values(self, acr_values: HashSet<String>) -> Self

Set the acr_values field of this AuthorizationRequestData.

source

pub fn with_response_mode(self, response_mode: ResponseMode) -> Self

Set the response_mode field of this AuthorizationRequestData.

Trait Implementations§

source§

impl Clone for AuthorizationRequestData

source§

fn clone(&self) -> AuthorizationRequestData

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AuthorizationRequestData

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> DynClone for T
where T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FutureExt for T

source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
source§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more