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 Summary
Constructors Constructor Description UserFacade() -
Method Summary
Modifier and Type Method Description static StringgetAuthType()static StringgetInvocationCount()static StringgetLanguage()The accept-language attribute returns multiple values.static StringgetName()Gets the user name.static StringgetName(javax.servlet.http.HttpServletRequest request)Gets the user name by a given request as parameter.static StringgetName(javax.websocket.Session session)Gets the user name by a given request as parameter.static StringgetSecurityToken()The Authorization header returns the type + token.static IntegergetTimeout()static booleanisInRole(String role)Checks if the user is in role.static voidsetName(String userName)Sets the user name.
-
Constructor Details
-
UserFacade
public UserFacade()
-
-
Method Details
-
getName
Gets the user name.- Returns:
- the user name
-
isInRole
Checks if the user is in role.- Parameters:
role- the role- Returns:
- true, if the user is in role
-
setName
Sets the user name.- Parameters:
userName- the user name- Throws:
ContextException- in case of not initialized ThreadContext
-
getName
Gets the user name by a given request as parameter.- Returns:
- the user name
-
getName
Gets the user name by a given request as parameter.- Returns:
- the user name
-
getTimeout
-
getAuthType
-
getSecurityToken
The Authorization header returns the type + token. Substring from the empty space to only get the token. -
getInvocationCount
-
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.
-