com.atlassian.confluence.user
Class ConfluenceAuthenticator

java.lang.Object
  extended by com.atlassian.seraph.auth.AbstractAuthenticator
      extended by com.atlassian.seraph.auth.DefaultAuthenticator
          extended by com.atlassian.confluence.user.ConfluenceAuthenticator
All Implemented Interfaces:
com.atlassian.seraph.auth.Authenticator, com.atlassian.seraph.Initable, java.io.Serializable
Direct Known Subclasses:
ConfluenceGroupJoiningAuthenticator

public class ConfluenceAuthenticator
extends com.atlassian.seraph.auth.DefaultAuthenticator

Authenticator which uses Confluence's user management code to authenticate a user against the directory which they come from (e.g. internal, LDAP, Crowd).

See Also:
UserAccessor.authenticate(String, String), Serialized Form

Field Summary
 
Fields inherited from class com.atlassian.seraph.auth.DefaultAuthenticator
LOGGED_IN_KEY, LOGGED_OUT_KEY
 
Fields inherited from interface com.atlassian.seraph.auth.Authenticator
DEFAULT_AUTHENTICATOR
 
Constructor Summary
ConfluenceAuthenticator()
           
 
Method Summary
protected  boolean authenticate(java.security.Principal user, java.lang.String password)
           
protected  boolean authoriseUserAndEstablishSession(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, java.security.Principal principal)
           
protected  com.atlassian.event.api.EventPublisher getEventPublisher()
           
 java.security.Principal getUser(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse httpServletResponse)
           
protected  ConfluenceUser getUser(java.lang.String uid)
           
protected  UserAccessor getUserAccessor()
           
protected  boolean isPrincipalAlreadyInSessionContext(javax.servlet.http.HttpServletRequest httpServletRequest, java.security.Principal principal)
           
 boolean login(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, java.lang.String username, java.lang.String password, boolean setRememberMeCookie)
           
 boolean logout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  void putPrincipalInSessionContext(javax.servlet.http.HttpServletRequest httpServletRequest, java.security.Principal principal)
           
protected  java.security.Principal refreshPrincipalObtainedFromSession(javax.servlet.http.HttpServletRequest httpServletRequest, java.security.Principal principal)
           
 void setUserAccessor(UserAccessor userAccessor)
           
 
Methods inherited from class com.atlassian.seraph.auth.DefaultAuthenticator
getAuthType, getElevatedSecurityGuard, getLogoutInterceptors, getRememberMeService, getRoleMapper, getUserFromBasicAuthentication, getUserFromCookie, getUserFromSession, init, isAuthorised, isUserInRole, removePrincipalFromSessionContext
 
Methods inherited from class com.atlassian.seraph.auth.AbstractAuthenticator
destroy, getConfig, getRemoteUser, getUser, login
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfluenceAuthenticator

public ConfluenceAuthenticator()
Method Detail

logout

public boolean logout(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
               throws com.atlassian.seraph.auth.AuthenticatorException
Specified by:
logout in interface com.atlassian.seraph.auth.Authenticator
Overrides:
logout in class com.atlassian.seraph.auth.DefaultAuthenticator
Throws:
com.atlassian.seraph.auth.AuthenticatorException

login

public boolean login(javax.servlet.http.HttpServletRequest httpServletRequest,
                     javax.servlet.http.HttpServletResponse httpServletResponse,
                     java.lang.String username,
                     java.lang.String password,
                     boolean setRememberMeCookie)
              throws com.atlassian.seraph.auth.AuthenticatorException
Specified by:
login in interface com.atlassian.seraph.auth.Authenticator
Overrides:
login in class com.atlassian.seraph.auth.DefaultAuthenticator
Throws:
com.atlassian.seraph.auth.AuthenticatorException

authenticate

protected boolean authenticate(java.security.Principal user,
                               java.lang.String password)
                        throws com.atlassian.seraph.auth.AuthenticatorException
Specified by:
authenticate in class com.atlassian.seraph.auth.DefaultAuthenticator
Throws:
com.atlassian.seraph.auth.AuthenticatorException

isPrincipalAlreadyInSessionContext

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

putPrincipalInSessionContext

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

refreshPrincipalObtainedFromSession

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

getEventPublisher

protected com.atlassian.event.api.EventPublisher getEventPublisher()

setUserAccessor

public void setUserAccessor(UserAccessor userAccessor)

getUserAccessor

protected UserAccessor getUserAccessor()

getUser

protected ConfluenceUser getUser(java.lang.String uid)
Specified by:
getUser in class com.atlassian.seraph.auth.DefaultAuthenticator

getUser

public java.security.Principal getUser(javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse httpServletResponse)
Specified by:
getUser in interface com.atlassian.seraph.auth.Authenticator
Overrides:
getUser in class com.atlassian.seraph.auth.DefaultAuthenticator

authoriseUserAndEstablishSession

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


Copyright © 2003-2014 Atlassian. All Rights Reserved.