Class AuthenticatedUserUtil
java.lang.Object
com.atlassian.crowd.plugin.rest.service.util.RestAuthSessionHelperUtil
com.atlassian.crowd.plugin.rest.service.util.AuthenticatedUserUtil
Utility for setting and retrieving the authenticated user's name from the
HttpServletRequest.- Since:
- v2.1
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetAuthenticatedUser(javax.servlet.http.HttpServletRequest request) Returns the username from theHttpSession, ornullif no username was found.static voidsetAuthenticatedUser(javax.servlet.http.HttpServletRequest request, String username) Sets the name of the authenticated application as an attribute of theHttpSession.Methods inherited from class com.atlassian.crowd.plugin.rest.service.util.RestAuthSessionHelperUtil
fetchStringFromRequestSession
-
Field Details
-
USER_ATTRIBUTE_KEY
- See Also:
-
-
Method Details
-
getAuthenticatedUser
Returns the username from theHttpSession, ornullif no username was found.- Parameters:
request- HTTP servlet request- Returns:
- name of the authenticated user,
nullif no username was found
-
setAuthenticatedUser
public static void setAuthenticatedUser(javax.servlet.http.HttpServletRequest request, String username) Sets the name of the authenticated application as an attribute of theHttpSession.- Parameters:
request- HTTP servlet requestusername- name of the authenticated user
-