public class AuthenticatedUserUtil extends RestAuthSessionHelperUtil
HttpServletRequest
.Modifier and Type | Field and Description |
---|---|
static String |
USER_ATTRIBUTE_KEY |
Modifier and Type | Method and Description |
---|---|
static String |
getAuthenticatedUser(javax.servlet.http.HttpServletRequest request)
Returns the username from the
HttpSession , or null if no username was found. |
static void |
setAuthenticatedUser(javax.servlet.http.HttpServletRequest request,
String username)
Sets the name of the authenticated application as an attribute of the
HttpSession . |
fetchStringFromRequestSession
public static final String USER_ATTRIBUTE_KEY
@Nullable public static String getAuthenticatedUser(javax.servlet.http.HttpServletRequest request)
HttpSession
, or null if no username was found.request
- HTTP servlet requestpublic static void setAuthenticatedUser(javax.servlet.http.HttpServletRequest request, String username)
HttpSession
.request
- HTTP servlet requestusername
- name of the authenticated userCopyright © 2024 Atlassian. All rights reserved.