Class HttpMessageContextImpl

  • All Implemented Interfaces:
    jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext

    public class HttpMessageContextImpl
    extends Object
    implements jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
    A convenience context that provides access to JASPIC Servlet Profile specific types and functionality.
    Author:
    Arjan Tijms
    • Constructor Detail

      • HttpMessageContextImpl

        public HttpMessageContextImpl​(CallbackHandler handler,
                                      jakarta.security.auth.message.MessageInfo messageInfo,
                                      Subject clientSubject)
    • Method Detail

      • isProtected

        public boolean isProtected()
        Specified by:
        isProtected in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
      • isAuthenticationRequest

        public boolean isAuthenticationRequest()
        Specified by:
        isAuthenticationRequest in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
      • isRegisterSession

        public boolean isRegisterSession()
        Specified by:
        isRegisterSession in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
      • setRegisterSession

        public void setRegisterSession​(String username,
                                       Set<String> groups)
        Specified by:
        setRegisterSession in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
      • cleanClientSubject

        public void cleanClientSubject()
        Specified by:
        cleanClientSubject in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
      • getAuthParameters

        public jakarta.security.enterprise.authentication.mechanism.http.AuthenticationParameters getAuthParameters()
        Specified by:
        getAuthParameters in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
      • getHandler

        public CallbackHandler getHandler()
        Specified by:
        getHandler in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
      • getMessageInfo

        public jakarta.security.auth.message.MessageInfo getMessageInfo()
        Specified by:
        getMessageInfo in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
      • getClientSubject

        public Subject getClientSubject()
        Specified by:
        getClientSubject in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
      • getRequest

        public jakarta.servlet.http.HttpServletRequest getRequest()
        Specified by:
        getRequest in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
      • setRequest

        public void setRequest​(jakarta.servlet.http.HttpServletRequest request)
        Specified by:
        setRequest in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
      • withRequest

        public jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext withRequest​(jakarta.servlet.http.HttpServletRequest request)
        Specified by:
        withRequest in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
      • getResponse

        public jakarta.servlet.http.HttpServletResponse getResponse()
        Specified by:
        getResponse in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
      • setResponse

        public void setResponse​(jakarta.servlet.http.HttpServletResponse response)
        Specified by:
        setResponse in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
      • redirect

        public jakarta.security.enterprise.AuthenticationStatus redirect​(String location)
        Specified by:
        redirect in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
      • forward

        public jakarta.security.enterprise.AuthenticationStatus forward​(String path)
        Specified by:
        forward in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
      • responseUnauthorized

        public jakarta.security.enterprise.AuthenticationStatus responseUnauthorized()
        Specified by:
        responseUnauthorized in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
      • responseNotFound

        public jakarta.security.enterprise.AuthenticationStatus responseNotFound()
        Specified by:
        responseNotFound in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
      • notifyContainerAboutLogin

        public jakarta.security.enterprise.AuthenticationStatus notifyContainerAboutLogin​(String callerName,
                                                                                          Set<String> groups)
        Specified by:
        notifyContainerAboutLogin in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
      • notifyContainerAboutLogin

        public jakarta.security.enterprise.AuthenticationStatus notifyContainerAboutLogin​(jakarta.security.enterprise.identitystore.CredentialValidationResult result)
        Specified by:
        notifyContainerAboutLogin in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
      • notifyContainerAboutLogin

        public jakarta.security.enterprise.AuthenticationStatus notifyContainerAboutLogin​(Principal callerPrincipal,
                                                                                          Set<String> groups)
        Specified by:
        notifyContainerAboutLogin in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
      • doNothing

        public jakarta.security.enterprise.AuthenticationStatus doNothing()
        Specified by:
        doNothing in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
      • getCallerPrincipal

        public Principal getCallerPrincipal()
        Specified by:
        getCallerPrincipal in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext
      • getGroups

        public Set<String> getGroups()
        Specified by:
        getGroups in interface jakarta.security.enterprise.authentication.mechanism.http.HttpMessageContext