Class Authentication


  • public class Authentication
    extends java.lang.Object

    Allows to expose the id of the currently authenticated user, his groups and his tenants to the process engine.

    The current authentication is managed using a Thread Local. The value can be set using #setCurrentAuthentication(String, List), retrieved using #getCurrentAuthentication() and cleared using #clearCurrentAuthentication().

    Users typically do not use this class directly but rather use the corresponding Service API methods:

    Author:
    Tom Baeyens, Daniel Meyer
    • Constructor Summary

      Constructors 
      Constructor Description
      Authentication()  
      Authentication​(java.lang.String authenticatedUserId, java.util.List<java.lang.String> groupIds)  
      Authentication​(java.lang.String authenticatedUserId, java.util.List<java.lang.String> authenticatedGroupIds, java.util.List<java.lang.String> authenticatedTenantIds)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> getGroupIds()  
      java.util.List<java.lang.String> getTenantIds()  
      java.lang.String getUserId()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • authenticatedUserId

        protected java.lang.String authenticatedUserId
      • authenticatedGroupIds

        protected java.util.List<java.lang.String> authenticatedGroupIds
      • authenticatedTenantIds

        protected java.util.List<java.lang.String> authenticatedTenantIds
    • Constructor Detail

      • Authentication

        public Authentication()
      • Authentication

        public Authentication​(java.lang.String authenticatedUserId,
                              java.util.List<java.lang.String> groupIds)
      • Authentication

        public Authentication​(java.lang.String authenticatedUserId,
                              java.util.List<java.lang.String> authenticatedGroupIds,
                              java.util.List<java.lang.String> authenticatedTenantIds)
    • Method Detail

      • getGroupIds

        public java.util.List<java.lang.String> getGroupIds()
      • getUserId

        public java.lang.String getUserId()
      • getTenantIds

        public java.util.List<java.lang.String> getTenantIds()