Class ServletMessageInfo

  • All Implemented Interfaces:
    javax.security.auth.message.MessageInfo

    public class ServletMessageInfo
    extends ElytronMessageInfo
    A servlet profile specific MessageInfo that ensures the request and response types remain valid and allows wrapping an existing message info during validateRequest and unwrapping during secureResponse.
    Author:
    Darran Lofthouse
    • Constructor Detail

      • ServletMessageInfo

        public ServletMessageInfo()
    • Method Detail

      • setRequestMessage

        public void setRequestMessage​(Object requestMessage)
        Set the request message ensuring that it is an instance of HttpServletRequest, also ensure wrapping only occurs during calls to validateRequest and unwrapping occurs during calls to secureResponse.
        Specified by:
        setRequestMessage in interface javax.security.auth.message.MessageInfo
        Overrides:
        setRequestMessage in class ElytronMessageInfo
        Parameters:
        requestMessage - the request message.
        See Also:
        MessageInfo.setRequestMessage(java.lang.Object)
      • setResponseMessage

        public void setResponseMessage​(Object responseMessage)
        Set the response message ensuring that it is an instance of HttpServletResponse, also ensure wrapping only occurs during calls to validateRequest and unwrapping occurs during calls to secureResponse.
        Specified by:
        setResponseMessage in interface javax.security.auth.message.MessageInfo
        Overrides:
        setResponseMessage in class ElytronMessageInfo
        Parameters:
        responseMessage - the response message.
        See Also:
        MessageInfo.setResponseMessage(java.lang.Object)
      • unwrap

        private javax.servlet.ServletRequest unwrap​(javax.servlet.ServletRequest servletRequest)
      • unwrap

        private javax.servlet.ServletResponse unwrap​(javax.servlet.ServletResponse servletResponse)