See: Description
| Interface | Description |
|---|---|
| LoginService |
LoginService provides user authentication and session management of users
logged in to the mPRM.
|
| UserSession |
Represent the session between an user and mPRM system.
|
| Class | Description |
|---|---|
| SessionContext |
Provides methods for obtaining the user session associated with the current thread of execution
and for verification wether the corresponding logged in user is in particular role.
|
| UserProtectionDomain |
| Exception | Description |
|---|---|
| LoginException |
Indicates an unsuccessful user authentication.
|
Provides API for user authentication and session management. The APIs in this package are available only to the components deployed on the mPRM Bachend Servers. The LoginService can be obtained as service from the OSGi service regisisty of the Backend Hosts. It provides methods for authentication and session initialization. This interface is used by the system components of the mPRM, such as mPower RPC service to autenticate the remote users.
Most useful for the custom applications is the SessionContext class. It can be used by the determine the user sessions associated with the current execution content and to perform authorization checking for access to security sensitive resources.
Here is an example of using the SessionContext:
|
import com.prosyst.mprm.backend.login.SessionContext; import java.util.Hashtable; ..... public String getInfo() { //Check the whether the user invoking this method has an administration role. if (SessionContext.hasRole("administration")) { .... // return the information } else { throw new SecurityException("Access Denied"); } } ..... |
Copyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.