Class ContainerAuthentication

  • All Implemented Interfaces:
    Serializable, Principal,

    public final class ContainerAuthentication
    extends Object
    Authentication implementation for Principal given through HttpServletRequest.

    This is used to plug the container authentication to Spring Security, for backward compatibility with Hudson < 1.160.

    Kohsuke Kawaguchi
    See Also:
    Serialized Form
    • Constructor Detail

      • ContainerAuthentication

        public ContainerAuthentication​(javax.servlet.http.HttpServletRequest request)
        Servlet container can tie a ServletRequest to the request handling thread, so we need to capture all the information upfront to allow Authentication to be passed to other threads, like update center does. See JENKINS-5382.
    • Method Detail

      • getAuthorities

        public Collection<? extends> getAuthorities()
        Specified by:
        getAuthorities in interface
      • getCredentials

        public Object getCredentials()
        Specified by:
        getCredentials in interface
      • getDetails

        public Object getDetails()
        Specified by:
        getDetails in interface
      • getPrincipal

        public String getPrincipal()
        Specified by:
        getPrincipal in interface
      • isAuthenticated

        public boolean isAuthenticated()
        Specified by:
        isAuthenticated in interface