Class UserFacade

java.lang.Object
org.eclipse.dirigible.api.v3.security.UserFacade
All Implemented Interfaces:
IScriptingFacade

public class UserFacade
extends Object
implements IScriptingFacade
The Class UserFacade.
  • Constructor Details

  • Method Details

    • getName

      public static final String getName()
      Gets the user name.
      Returns:
      the user name
    • isInRole

      public static final boolean isInRole​(String role)
      Checks if the user is in role.
      Parameters:
      role - the role
      Returns:
      true, if the user is in role
    • setName

      public static final void setName​(String userName) throws ContextException
      Sets the user name.
      Parameters:
      userName - the user name
      Throws:
      ContextException - in case of not initialized ThreadContext
    • getName

      public static final String getName​(javax.servlet.http.HttpServletRequest request)
      Gets the user name by a given request as parameter.
      Returns:
      the user name
    • getName

      public static final String getName​(javax.websocket.Session session)
      Gets the user name by a given request as parameter.
      Returns:
      the user name
    • getTimeout

      public static final Integer getTimeout()
    • getAuthType

      public static String getAuthType()
    • getSecurityToken

      public static String getSecurityToken()
      The Authorization header returns the type + token. Substring from the empty space to only get the token.
    • getInvocationCount

      public static String getInvocationCount()
    • getLanguage

      public static String getLanguage()
      The accept-language attribute returns multiple values. Eg. en-GB,en-US;q=0.9,en;q=0.8 Substring until the semicolon to get the IETF (BCP 47) format.