SecurityManager

SecurityManager provides a centralized interface for all security related services. It contains methods to logon or logoff a user or to check security privileges and credentials.

The SecurityManager is accessed using EbaseSystem#getSecurityManager().

SecurityManager Functions

checkCredentialValue SecurityManager.checkCredentialValue( credentialName , credentialValue ) Returns true if the user credential identified by credentialName exists with the value credentialValue, otherwise returns false.
getCredentials SecurityManager.getCredentials( ) Returns all of the User credentials that are established by the System Logon Service when the user logs on.
isDesignerUser SecurityManager.isDesignerUser( ) Returns true when a form has been submitted from the designer, otherwise returns false.
isGatewayRequest SecurityManager.isGatewayRequest( ) Returns true if the incoming Http Request contains the Gateway Authentication Token, otherwise false
getCredential SecurityManager.getCredential( credentialName ) Returns the credential value for the user credential identified by credentialName, or null if the credential does not exist or no user is logged on.
hasRole SecurityManager.hasRole( roleName ) Returns true when a user is logged on and the user has the role identified by roleName, otherwise returns false.
isAuthorized SecurityManager.isAuthorized( type , name , function ) Returns true when a user is logged on and the user has the authorization identified by type, name and function;otherwise returns false.
isUserLoggedOn SecurityManager.isUserLoggedOn( [userId ] ) Returns true if the named user is currently logged on to the server, otherwise returns false.
getJwtManager SecurityManager.getJwtManager( ) Returns a JWTManager that is used to generate or parsing JSON Web Tokens (JWT), JSON Signature Tokens (JWS) or JSON Web Encryption (JWE)
getKeyManager SecurityManager.getKeyManager( ) Used either generate a HMAC hashed based {@link SecretKey} or lookup a {@link PublicKey}/{@link PrivateKey} from a system keystore or from a remote JSON Web Key (JWK) Set
logoff SecurityManager.logoff( ) Logs a user off the system, this is the reverse of method #logon(String[][]).
logon SecurityManager.logon( inParameters ) Logs a user onto the system by calling the default System Logon Service identified in the Server Admin App > Security > User Authentication.
logon SecurityManager.logon( webServiceName , inParameters ) Logs a user onto the system by calling the specific System Logon Service identified by parameter webServiceName.
logonGatewayAuthentication SecurityManager.logonGatewayAuthentication( gatewayServerName ) Logon using the Gateway Authentication Token.
logonOpenIdConnect SecurityManager.logonOpenIdConnect( openIdConnectName [, scope ] ) Logon using OpenID Connect.
getRoles SecurityManager.getRoles( ) Returns an array of role names for the logged on user
updateLoggedOnUser SecurityManager.updateLoggedOnUser( webServiceName , userId , inParameters ) If the user identified by userId is currently logged on, the specific System Logon Service identified by parameter webServiceName is invoked and all sessions where the user is logged on are updated; if the user is not currently logged on no action is taken.
updateLoggedOnUser SecurityManager.updateLoggedOnUser( userId , inParameters ) If the user identified by userId is currently logged on, the default System Logon Service is invoked and all sessions where the user is logged on are updated; if the user is not currently logged on no action is taken.
getUserName SecurityManager.getUserName( ) Returns the user name when a user is logged on or null when no user is logged on.