Class HTTPPostAuthnRequestEncoder

All Implemented Interfaces:
Predicate<OAuth2AuthorizationProfileConfiguration.HttpRequestMethod>, OIDCMessageEncoder, Component, DestructableComponent, InitializableComponent, UnmodifiableComponent, MessageEncoder, HttpServletResponseMessageEncoder

@Deprecated(since="3.4.0", forRemoval=true) public class HTTPPostAuthnRequestEncoder extends AbstractOIDCMessageEncoder
Deprecated, for removal: This API element is subject to removal in a future version.
Use HTTPPostRequestEncoder, which now handles both authentication and logout requests.
A message encoder that encodes an OpenID authentication request by HTTP Form POST Serialization.
  • Field Details

    • DEFAULT_TEMPLATE_ID

      @Nonnull @NotEmpty public static final String DEFAULT_TEMPLATE_ID
      Deprecated, for removal: This API element is subject to removal in a future version.
      Default template ID for using FORM POST request type.
      See Also:
    • log

      @Nonnull private final org.slf4j.Logger log
      Deprecated, for removal: This API element is subject to removal in a future version.
      Class logger.
    • velocityEngine

      @Nullable private org.apache.velocity.app.VelocityEngine velocityEngine
      Deprecated, for removal: This API element is subject to removal in a future version.
      Velocity engine used to evaluate the template when using FORM POST response mode.
    • velocityTemplateId

      @Nonnull @NotEmpty private String velocityTemplateId
      Deprecated, for removal: This API element is subject to removal in a future version.
      ID of the Velocity template used when using FORM POST response mode.
    • cspDigester

      @Nullable private StringDigester cspDigester
      Deprecated, for removal: This API element is subject to removal in a future version.
      CSP digester for generating CSP hashes.
    • cspNonceGenerator

      @Nullable private IdentifierGenerationStrategy cspNonceGenerator
      Deprecated, for removal: This API element is subject to removal in a future version.
      CSP nonce generator.
  • Constructor Details

    • HTTPPostAuthnRequestEncoder

      public HTTPPostAuthnRequestEncoder()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • setCSPDigester

      public void setCSPDigester(@Nullable StringDigester digester)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets a StringDigester to use in computing CSP digests in views.
      Parameters:
      digester - digester to set
      Since:
      3.1.0
    • setCSPNonceGenerator

      public void setCSPNonceGenerator(@Nullable IdentifierGenerationStrategy strategy)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets an IdentifierGenerationStrategy to use in computing CSP nonces in views.
      Parameters:
      strategy - nonce strategy
      Since:
      3.1.0
    • setVelocityTemplateId

      public void setVelocityTemplateId(@Nonnull @NotEmpty String newVelocityTemplateId)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the VelocityEngine instance.
      Parameters:
      newVelocityEngine - the new VelocityEngine instane
    • test

      public boolean test(@Nullable OAuth2AuthorizationProfileConfiguration.HttpRequestMethod requestMethod)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • doPostEncode

      private org.apache.velocity.VelocityContext doPostEncode(@Nonnull OIDCAuthenticationRequest request, @Nonnull HttpServletResponse httpResponse) throws MessageEncodingException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Construct form POST.
      Parameters:
      request - the authentication request.
      httpResponse - the httpResponse.
      Returns:
      response message as velocity context.
      Throws:
      MessageEncodingException - on error building the parameters
    • doEncode

      protected void doEncode() throws MessageEncodingException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      doEncode in class AbstractMessageEncoder
      Throws:
      MessageEncodingException