Skip navigation links

Package com.prosyst.mprm.backend.login

Provides API for user authentication and session management.

See: Description

Package com.prosyst.mprm.backend.login Description

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");
    }
  }

.....

Skip navigation links

Copyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.