Class DefaultUserInfoRequestEncoder
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- net.shibboleth.idp.plugin.authn.oidc.rp.encoding.impl.AbstractRequestEncoderFunction
-
- net.shibboleth.idp.plugin.authn.oidc.rp.encoding.impl.DefaultUserInfoRequestEncoder
-
- All Implemented Interfaces:
Function<ProfileRequestContext,org.apache.http.client.methods.HttpUriRequest>,Component,DestructableComponent,InitializableComponent
public class DefaultUserInfoRequestEncoder extends AbstractRequestEncoderFunction
Default encoder for UserInfo requests.
-
-
Field Summary
Fields Modifier and Type Field Description private static StringHTTPSThe HTTPS scheme.private org.slf4j.LoggerlogClass logger.private Function<ProfileRequestContext,AccessTokenResponseContext>tokenResponseContextLookupStrategyStrategy used to look up theAccessTokenResponseContextto set the parameters for.
-
Constructor Summary
Constructors Constructor Description DefaultUserInfoRequestEncoder()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidaddBearerToken(org.apache.http.client.methods.RequestBuilder rb, AccessTokenResponseContext responseCtx)Add the bearer token to the Authorization header, used when issuing HTTP GET requests.org.apache.http.client.methods.HttpUriRequestdoApply(ProfileRequestContext profileRequestContext)Encode a HttpUriRequest from the given context.-
Methods inherited from class net.shibboleth.idp.plugin.authn.oidc.rp.encoding.impl.AbstractRequestEncoderFunction
apply, getAuthenticationRequest, getAuthenticationResponse, getClientAuthenticationContext, getProviderMetadataContext, setOIDCClientAuthenticationContextContextLookupStrategy, setProviderMetadataLookupStrategy
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized
-
-
-
-
Field Detail
-
HTTPS
@Nonnull @NotEmpty private static final String HTTPS
The HTTPS scheme.- See Also:
- Constant Field Values
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
tokenResponseContextLookupStrategy
@Nonnull private final Function<ProfileRequestContext,AccessTokenResponseContext> tokenResponseContextLookupStrategy
Strategy used to look up theAccessTokenResponseContextto set the parameters for.
-
-
Method Detail
-
doApply
public org.apache.http.client.methods.HttpUriRequest doApply(@Nonnull ProfileRequestContext profileRequestContext)Description copied from class:AbstractRequestEncoderFunctionEncode a HttpUriRequest from the given context. Implementations should override this method.- Specified by:
doApplyin classAbstractRequestEncoderFunction- Parameters:
profileRequestContext- the profile request context.- Returns:
- the request to execute.
-
addBearerToken
private void addBearerToken(@Nonnull org.apache.http.client.methods.RequestBuilder rb, @Nonnull AccessTokenResponseContext responseCtx) throws OIDCRPExceptionAdd the bearer token to the Authorization header, used when issuing HTTP GET requests.- Parameters:
rb- the request builder to use.responseCtx- the response context to find the access_token from.- Throws:
OIDCRPException- if there is an issue adding the bearer token to the Authorization header.
-
-