pub struct UserInfoRequest<'a, JE, JS, JT, JU, K>{ /* private fields */ }
Expand description

User info request.

Implementations§

source§

impl<'a, JE, JS, JT, JU, K> UserInfoRequest<'a, JE, JS, JT, JU, K>

source

pub fn request<AC, GC, HC, RE>( self, http_client: HC ) -> Result<UserInfoClaims<AC, GC>, UserInfoError<RE>>
where AC: AdditionalClaims, GC: GenderClaim, HC: FnOnce(HttpRequest) -> Result<HttpResponse, RE>, RE: Error + 'static,

Submits this request to the associated user info endpoint using the specified synchronous HTTP client.

source

pub async fn request_async<AC, C, F, GC, RE>( self, http_client: C ) -> Result<UserInfoClaims<AC, GC>, UserInfoError<RE>>
where AC: AdditionalClaims, C: FnOnce(HttpRequest) -> F, F: Future<Output = Result<HttpResponse, RE>>, GC: GenderClaim, RE: Error + 'static,

Submits this request to the associated user info endpoint using the specified asynchronous HTTP client.

source

pub fn require_signed_response(self, require_signed_response: bool) -> Self

Specifies whether to require the user info response to be a signed JSON Web Token (JWT).

source

pub fn require_issuer_match(self, iss_required: bool) -> Self

Specifies whether to require the issuer of the signed JWT response to match the expected issuer URL for this provider.

This option has no effect on unsigned JSON responses.

source

pub fn require_audience_match(self, aud_required: bool) -> Self

Specifies whether to require the audience of the signed JWT response to match the expected audience (client ID).

This option has no effect on unsigned JSON responses.

source

pub fn set_response_type(self, response_type: UserInfoResponseType) -> Self

Specifies the expected response type by setting the Accept header. Note that the server can ignore this header.

Auto Trait Implementations§

§

impl<'a, JE, JS, JT, JU, K> !RefUnwindSafe for UserInfoRequest<'a, JE, JS, JT, JU, K>

§

impl<'a, JE, JS, JT, JU, K> Send for UserInfoRequest<'a, JE, JS, JT, JU, K>
where JE: Send, JS: Send, JT: Send, JU: Send, K: Send,

§

impl<'a, JE, JS, JT, JU, K> Sync for UserInfoRequest<'a, JE, JS, JT, JU, K>
where JE: Sync, JS: Sync, JT: Sync, JU: Sync, K: Sync,

§

impl<'a, JE, JS, JT, JU, K> Unpin for UserInfoRequest<'a, JE, JS, JT, JU, K>
where JE: Unpin, JS: Unpin, JT: Unpin, JU: Unpin, K: Unpin,

§

impl<'a, JE, JS, JT, JU, K> !UnwindSafe for UserInfoRequest<'a, JE, JS, JT, JU, K>

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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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> Same for T

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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