Class ConfluenceCrowdSSOAuthenticator

  • All Implemented Interfaces:
    com.atlassian.seraph.auth.Authenticator, com.atlassian.seraph.Initable, Serializable

    public class ConfluenceCrowdSSOAuthenticator
    extends com.atlassian.crowd.integration.seraph.CrowdAuthenticator
    Use this authenticator instead of the default ConfluenceAuthenticator to enable SSO.
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class com.atlassian.crowd.integration.seraph.CrowdAuthenticator

        logger, PASSWORD_RESET_REQUIRED_HEADER
      • Fields inherited from class com.atlassian.seraph.auth.DefaultAuthenticator

        LOGGED_IN_KEY, LOGGED_OUT_KEY
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean authoriseUserAndEstablishSession​(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, Principal principal)  
      protected com.atlassian.seraph.service.rememberme.RememberMeService getRememberMeService()  
      protected Principal getUser​(String username)  
      Principal getUser​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      void init​(Map<String,​String> params, com.atlassian.seraph.config.SecurityConfig config)  
      boolean isCrowdSetup()  
      protected boolean isPrincipalAlreadyInSessionContext​(javax.servlet.http.HttpServletRequest httpServletRequest, Principal principal)  
      boolean login​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String username, String password, boolean cookie)  
      protected void logoutUser​(javax.servlet.http.HttpServletRequest request)  
      protected void putPrincipalInSessionContext​(javax.servlet.http.HttpServletRequest httpServletRequest, Principal principal)  
      protected Principal refreshPrincipalObtainedFromSession​(javax.servlet.http.HttpServletRequest httpServletRequest, Principal principal)  
      • Methods inherited from class com.atlassian.crowd.integration.seraph.CrowdAuthenticator

        authenticate, checkAuthenticated, checkRememberMeLoginToCrowd, fetchUserInCache, isAuthenticated, logout, rememberMeLoginToCrowd
      • Methods inherited from class com.atlassian.seraph.auth.DefaultAuthenticator

        getAuthType, getElevatedSecurityGuard, getLogoutInterceptors, getRoleMapper, getUserFromBasicAuthentication, getUserFromCookie, getUserFromSession, isAuthorised, removePrincipalFromSessionContext
      • Methods inherited from class com.atlassian.seraph.auth.AbstractAuthenticator

        destroy, getConfig, getRemoteUser, getUser, login
    • Constructor Detail

      • ConfluenceCrowdSSOAuthenticator

        public ConfluenceCrowdSSOAuthenticator()
    • Method Detail

      • init

        public void init​(Map<String,​String> params,
                         com.atlassian.seraph.config.SecurityConfig config)
        Specified by:
        init in interface com.atlassian.seraph.Initable
        Overrides:
        init in class com.atlassian.seraph.auth.DefaultAuthenticator
      • getUser

        public Principal getUser​(javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response)
        Specified by:
        getUser in interface com.atlassian.seraph.auth.Authenticator
        Overrides:
        getUser in class com.atlassian.crowd.integration.seraph.CrowdAuthenticator
      • logoutUser

        protected void logoutUser​(javax.servlet.http.HttpServletRequest request)
        Specified by:
        logoutUser in class com.atlassian.crowd.integration.seraph.CrowdAuthenticator
      • getUser

        protected Principal getUser​(String username)
        Specified by:
        getUser in class com.atlassian.seraph.auth.DefaultAuthenticator
      • login

        public boolean login​(javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response,
                             String username,
                             String password,
                             boolean cookie)
                      throws com.atlassian.seraph.auth.AuthenticatorException
        Specified by:
        login in interface com.atlassian.seraph.auth.Authenticator
        Overrides:
        login in class com.atlassian.crowd.integration.seraph.CrowdAuthenticator
        Throws:
        com.atlassian.seraph.auth.AuthenticatorException
      • getRememberMeService

        protected com.atlassian.seraph.service.rememberme.RememberMeService getRememberMeService()
        Overrides:
        getRememberMeService in class com.atlassian.seraph.auth.DefaultAuthenticator
      • authoriseUserAndEstablishSession

        protected boolean authoriseUserAndEstablishSession​(javax.servlet.http.HttpServletRequest httpServletRequest,
                                                           javax.servlet.http.HttpServletResponse httpServletResponse,
                                                           Principal principal)
        Overrides:
        authoriseUserAndEstablishSession in class com.atlassian.seraph.auth.DefaultAuthenticator
      • isPrincipalAlreadyInSessionContext

        protected boolean isPrincipalAlreadyInSessionContext​(javax.servlet.http.HttpServletRequest httpServletRequest,
                                                             Principal principal)
        Overrides:
        isPrincipalAlreadyInSessionContext in class com.atlassian.seraph.auth.DefaultAuthenticator
      • putPrincipalInSessionContext

        protected void putPrincipalInSessionContext​(javax.servlet.http.HttpServletRequest httpServletRequest,
                                                    Principal principal)
        Overrides:
        putPrincipalInSessionContext in class com.atlassian.seraph.auth.DefaultAuthenticator
      • refreshPrincipalObtainedFromSession

        protected Principal refreshPrincipalObtainedFromSession​(javax.servlet.http.HttpServletRequest httpServletRequest,
                                                                Principal principal)
        Overrides:
        refreshPrincipalObtainedFromSession in class com.atlassian.seraph.auth.DefaultAuthenticator
      • isCrowdSetup

        public boolean isCrowdSetup()