Class AuthenticatedApplicationUtil

java.lang.Object
com.atlassian.crowd.plugin.rest.service.util.RestAuthSessionHelperUtil
com.atlassian.crowd.plugin.rest.service.util.AuthenticatedApplicationUtil

public class AuthenticatedApplicationUtil extends RestAuthSessionHelperUtil
Utility for setting and retrieving the application name and token from the HttpServletRequest.
Since:
v2.1
  • Field Details

    • APPLICATION_NAME_ATTRIBUTE_KEY

      public static final String APPLICATION_NAME_ATTRIBUTE_KEY
      See Also:
    • APPLICATION_TOKEN_ATTRIBUTE_KEY

      public static final String APPLICATION_TOKEN_ATTRIBUTE_KEY
      See Also:
    • APPLICATION_SESSION_INACTIVE_INTERVAL_SECONDS

      public static final int APPLICATION_SESSION_INACTIVE_INTERVAL_SECONDS
      See Also:
  • Method Details

    • getAuthenticatedApplication

      @Nullable public static String getAuthenticatedApplication(javax.servlet.http.HttpServletRequest request)
      Returns the application name from the HttpSession, or null if no application name was found.
      Parameters:
      request - HTTP servlet request
      Returns:
      name of the authenticated application, null if no application name was found
    • setAuthenticatedApplication

      public static void setAuthenticatedApplication(javax.servlet.http.HttpServletRequest request, String applicationName)
      Sets the name of the authenticated application as an attribute of the HttpSession.
      Parameters:
      request - HTTP servlet request
      applicationName - name of the authenticated application
    • getAuthenticatedApplicationToken

      @Nullable public static Token getAuthenticatedApplicationToken(javax.servlet.http.HttpServletRequest request)
      Returns the application token from the HttpSession, or null if there is none
      Parameters:
      request - HTTP servlet request
      Returns:
      application token of the authenticated application, or null if there is none
    • setAuthenticatedApplicationToken

      public static void setAuthenticatedApplicationToken(javax.servlet.http.HttpServletRequest request, Token token)
      Sets the application token of the authenticated application as an attribute of the HttpSession.
      Parameters:
      request - HTTP servlet request
      token - application token