|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.crowd.integration.http.util.CrowdHttpTokenHelperImpl
public class CrowdHttpTokenHelperImpl
Helper class for Crowd SSO token operations.
| Method Summary | |
|---|---|
String |
getCrowdToken(javax.servlet.http.HttpServletRequest request,
String tokenName)
Retrieves the Crowd authentication token from the request either via: a request attribute (not request parameter), OR a cookie on the request |
static CrowdHttpTokenHelper |
getInstance(CrowdHttpValidationFactorExtractor validationFactorExtractor)
Returns an instance of CrowdHttpTokenHelper. |
UserAuthenticationContext |
getUserAuthenticationContext(javax.servlet.http.HttpServletRequest request,
String username,
String password,
ClientProperties clientProperties)
Returns the user authentication context from a request. |
CrowdHttpValidationFactorExtractor |
getValidationFactorExtractor()
Returns the ValidationFactor extractor. |
void |
removeCrowdToken(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ClientProperties clientProperties,
CookieConfiguration cookieConfig)
Removes the Crowd SSO token. |
void |
setCrowdToken(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String token,
ClientProperties clientProperties,
CookieConfiguration cookieConfig)
Sets the Crowd SSO token in: the request: as an attribute, so the user is authenticated for the span of the request. the response: as a cookie, so the user is authenticated for subsequent requests. Also sets the last session validation date/time. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public String getCrowdToken(javax.servlet.http.HttpServletRequest request,
String tokenName)
CrowdHttpTokenHelper
getCrowdToken in interface CrowdHttpTokenHelperrequest - request to look for the Crowd SSO token.tokenName - name of the request attribute and cookie for the Crowd SSO token.
public void removeCrowdToken(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ClientProperties clientProperties,
CookieConfiguration cookieConfig)
CrowdHttpTokenHelper
removeCrowdToken in interface CrowdHttpTokenHelperrequest - request to invalidate the client for.response - response to invalidate the cookie for. Can be null.clientProperties - properties of the clientcookieConfig - cookie configuration. Can be null if response is null since no cookie will be set.
public void setCrowdToken(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String token,
ClientProperties clientProperties,
CookieConfiguration cookieConfig)
CrowdHttpTokenHelper
setCrowdToken in interface CrowdHttpTokenHelperrequest - request to set the attribute and session attribute for.response - response to set the cookie for. Can be null.token - token value to use.clientProperties - properties of the clientcookieConfig - Cookie configuration
public UserAuthenticationContext getUserAuthenticationContext(javax.servlet.http.HttpServletRequest request,
String username,
String password,
ClientProperties clientProperties)
CrowdHttpTokenHelper
getUserAuthenticationContext in interface CrowdHttpTokenHelperrequest - HttpRequest objectusername - user's namepassword - user's passwordclientProperties - properties of the client
public CrowdHttpValidationFactorExtractor getValidationFactorExtractor()
CrowdHttpTokenHelper
getValidationFactorExtractor in interface CrowdHttpTokenHelperpublic static CrowdHttpTokenHelper getInstance(CrowdHttpValidationFactorExtractor validationFactorExtractor)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||