Class HTTPPostAuthnRequestEncoder
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- org.opensaml.messaging.encoder.AbstractMessageEncoder
-
- org.opensaml.messaging.encoder.servlet.AbstractHttpServletResponseMessageEncoder
-
- net.shibboleth.oidc.profile.encoding.impl.AbstractOIDCMessageEncoder
-
- net.shibboleth.oidc.profile.encoding.impl.HTTPPostAuthnRequestEncoder
-
- All Implemented Interfaces:
Predicate<OAuth2AuthorizationProfileConfiguration.HttpRequestMethod>,OIDCMessageEncoder,Component,DestructableComponent,InitializableComponent,UnmodifiableComponent,MessageEncoder,HttpServletResponseMessageEncoder
public class HTTPPostAuthnRequestEncoder extends AbstractOIDCMessageEncoder
Amessage encoderthat encodes an OpenID authentication request by HTTP Form POST Serialization.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_TEMPLATE_IDDefault template ID for using FORM POST request type.private org.slf4j.LoggerlogClass logger.private org.apache.velocity.app.VelocityEnginevelocityEngineVelocity engine used to evaluate the template when using FORM POST response mode.private StringvelocityTemplateIdID of the Velocity template used when using FORM POST response mode.
-
Constructor Summary
Constructors Constructor Description HTTPPostAuthnRequestEncoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoEncode()private org.apache.velocity.VelocityContextdoPostEncode(OIDCAuthenticationRequest request)Construct form POST.voidsetVelocityEngine(org.apache.velocity.app.VelocityEngine newVelocityEngine)Set the VelocityEngine instance.voidsetVelocityTemplateId(String newVelocityTemplateId)Set the Velocity template id.booleantest(OAuth2AuthorizationProfileConfiguration.HttpRequestMethod requestMethod)-
Methods inherited from class net.shibboleth.oidc.profile.encoding.impl.AbstractOIDCMessageEncoder
createParametersFromRequest, serializeAuthorizationParamsToQueryString, serializeAuthorizationParamsToUrl, setAuthorizationParamsAreValidPredicate, validateParams
-
Methods inherited from class org.opensaml.messaging.encoder.servlet.AbstractHttpServletResponseMessageEncoder
doInitialize, getHttpServletResponse, getHttpServletResponseSupplier, setHttpServletResponse, setHttpServletResponseSupplier
-
Methods inherited from class org.opensaml.messaging.encoder.AbstractMessageEncoder
doDestroy, encode, getMessageContext, prepareContext, setMessageContext
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, initialize, isDestroyed, isInitialized
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.DestructableComponent
destroy, isDestroyed
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
-
Methods inherited from interface org.opensaml.messaging.encoder.MessageEncoder
encode, prepareContext, setMessageContext
-
-
-
-
Field Detail
-
DEFAULT_TEMPLATE_ID
@Nonnull @NotEmpty public static final String DEFAULT_TEMPLATE_ID
Default template ID for using FORM POST request type.- See Also:
- Constant Field Values
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
velocityEngine
@Nullable private org.apache.velocity.app.VelocityEngine velocityEngine
Velocity engine used to evaluate the template when using FORM POST response mode.
-
-
Method Detail
-
setVelocityTemplateId
public void setVelocityTemplateId(@Nonnull @NotEmpty String newVelocityTemplateId)
Set the Velocity template id.Defaults to
DEFAULT_TEMPLATE_ID.- Parameters:
newVelocityTemplateId- the new Velocity template id
-
setVelocityEngine
public void setVelocityEngine(@Nonnull org.apache.velocity.app.VelocityEngine newVelocityEngine)Set the VelocityEngine instance.- Parameters:
newVelocityEngine- the new VelocityEngine instane
-
test
public boolean test(@Nonnull OAuth2AuthorizationProfileConfiguration.HttpRequestMethod requestMethod)
-
doPostEncode
private org.apache.velocity.VelocityContext doPostEncode(@Nonnull OIDCAuthenticationRequest request) throws MessageEncodingExceptionConstruct form POST.- Parameters:
request- the authentication request.- Returns:
- response message as velocity context.
- Throws:
MessageEncodingException- on error building the parameters
-
doEncode
protected void doEncode() throws MessageEncodingException- Specified by:
doEncodein classAbstractMessageEncoder- Throws:
MessageEncodingException
-
-