Struct openidconnect::UserInfoRequest
source · pub struct UserInfoRequest<'a, JE, JS, JT, JU, K>where
JE: JweContentEncryptionAlgorithm<JT>,
JS: JwsSigningAlgorithm<JT>,
JT: JsonWebKeyType,
JU: JsonWebKeyUse,
K: JsonWebKey<JS, JT, JU>,{ /* private fields */ }
Expand description
User info request.
Implementations§
source§impl<'a, JE, JS, JT, JU, K> UserInfoRequest<'a, JE, JS, JT, JU, K>where
JE: JweContentEncryptionAlgorithm<JT>,
JS: JwsSigningAlgorithm<JT>,
JT: JsonWebKeyType,
JU: JsonWebKeyUse,
K: JsonWebKey<JS, JT, JU>,
impl<'a, JE, JS, JT, JU, K> UserInfoRequest<'a, JE, JS, JT, JU, K>where
JE: JweContentEncryptionAlgorithm<JT>,
JS: JwsSigningAlgorithm<JT>,
JT: JsonWebKeyType,
JU: JsonWebKeyUse,
K: JsonWebKey<JS, JT, JU>,
sourcepub 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,
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.
sourcepub 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,
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.
sourcepub fn require_signed_response(self, require_signed_response: bool) -> Self
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).
sourcepub fn require_issuer_match(self, iss_required: bool) -> Self
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.
sourcepub fn require_audience_match(self, aud_required: bool) -> Self
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.
sourcepub fn set_response_type(self, response_type: UserInfoResponseType) -> Self
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.