Class BambooAuthenticator
java.lang.Object
com.atlassian.seraph.auth.AbstractAuthenticator
com.atlassian.seraph.auth.DefaultAuthenticator
com.atlassian.crowd.integration.seraph.CrowdAuthenticator
com.atlassian.crowd.integration.seraph.v25.BambooAuthenticator
- All Implemented Interfaces:
com.atlassian.seraph.auth.Authenticator
,com.atlassian.seraph.Initable
,Serializable
public class BambooAuthenticator
extends com.atlassian.crowd.integration.seraph.CrowdAuthenticator
A Seraph
Authenticator
that works against Crowd and enables single sign-on.
This is not currently dynamic; it will only pick up configuration changes to the Crowd
client properties when Bamboo is restarted. It will only work against Crowd, not against JIRA.
This class is referenced in Bamboo + Crowd SSO documentation: https://confluence.atlassian.com/crowd/integrating-crowd-with-atlassian-bamboo-198785.html- See Also:
-
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_IN_USER_ID_KEY, LOGGED_OUT_KEY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Principal
getUser
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) void
boolean
login
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String username, String password, boolean cookie) boolean
logout
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) protected void
logoutUser
(javax.servlet.http.HttpServletRequest request) Clear the Acegi security context in Bamboo and replace it with anAnonymousAuthenticationToken
.Methods inherited from class com.atlassian.crowd.integration.seraph.CrowdAuthenticator
authenticate, checkAuthenticated, checkRememberMeLoginToCrowd, fetchUserInCache, isAuthenticated, rememberMeLoginToCrowd
Methods inherited from class com.atlassian.seraph.auth.DefaultAuthenticator
authoriseUserAndEstablishSession, getAuthType, getElevatedSecurityGuard, getLogoutInterceptors, getPrincipalFromSession, getRememberMeService, getRoleMapper, getUserFromBasicAuthentication, getUserFromCookie, getUserFromSession, isAuthorised, isPrincipalAlreadyInSessionContext, putPrincipalInSessionContext, refreshPrincipalObtainedFromSession, removePrincipalFromSessionContext
Methods inherited from class com.atlassian.seraph.auth.AbstractAuthenticator
destroy, getConfig, getRemoteUser, getUser, login
-
Constructor Details
-
BambooAuthenticator
public BambooAuthenticator()
-
-
Method Details
-
init
- Specified by:
init
in interfacecom.atlassian.seraph.Initable
- Overrides:
init
in classcom.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 interfacecom.atlassian.seraph.auth.Authenticator
- Overrides:
login
in classcom.atlassian.crowd.integration.seraph.CrowdAuthenticator
- Throws:
com.atlassian.seraph.auth.AuthenticatorException
-
getUser
- Specified by:
getUser
in classcom.atlassian.seraph.auth.DefaultAuthenticator
-
getUser
public Principal getUser(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) - Specified by:
getUser
in interfacecom.atlassian.seraph.auth.Authenticator
- Overrides:
getUser
in classcom.atlassian.crowd.integration.seraph.CrowdAuthenticator
-
logout
public boolean logout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws com.atlassian.seraph.auth.AuthenticatorException - Specified by:
logout
in interfacecom.atlassian.seraph.auth.Authenticator
- Overrides:
logout
in classcom.atlassian.crowd.integration.seraph.CrowdAuthenticator
- Throws:
com.atlassian.seraph.auth.AuthenticatorException
-
logoutUser
protected void logoutUser(javax.servlet.http.HttpServletRequest request) Clear the Acegi security context in Bamboo and replace it with anAnonymousAuthenticationToken
.- Specified by:
logoutUser
in classcom.atlassian.crowd.integration.seraph.CrowdAuthenticator
-