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 SeraphAuthenticator
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BambooAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
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
-
-
-
-
Method Detail
-
init
public void init(Map<String,String> params, com.atlassian.seraph.config.SecurityConfig config)
- 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
protected Principal getUser(String username)
- 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
-
-