Class Authentication

  • All Implemented Interfaces:
    java.io.Serializable, java.security.Principal
    Direct Known Subclasses:
    UserAuthentication

    public class Authentication
    extends java.lang.Object
    implements java.security.Principal, java.io.Serializable

    Represents an active authentication of a given identity (usually a user).

    In camunda webapps, an authentication exists between some identity (user) and a process engine

    Implements java.security.Principal so that this object may be used everywhere where a Principal is required.

    Author:
    Daniel Meyer
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Authentication​(java.lang.String identityId, java.lang.String processEngineName)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.String getIdentityId()  
      java.lang.String getName()
      java.security.Principal implementation: return the id of the identity (userId) behind this authentication
      java.lang.String getProcessEngineName()  
      int hashCode()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.security.Principal

        implies, toString
    • Field Detail

      • identityId

        protected final java.lang.String identityId
      • processEngineName

        protected final java.lang.String processEngineName
    • Constructor Detail

      • Authentication

        public Authentication​(java.lang.String identityId,
                              java.lang.String processEngineName)
    • Method Detail

      • getName

        public java.lang.String getName()
        java.security.Principal implementation: return the id of the identity (userId) behind this authentication
        Specified by:
        getName in interface java.security.Principal
      • getIdentityId

        public java.lang.String getIdentityId()
        Returns:
        the id of the identity (userId) behind this authentication
      • getProcessEngineName

        public java.lang.String getProcessEngineName()
        Returns:
        return the name of the process engine for which this authentication was established.
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.security.Principal
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface java.security.Principal
        Overrides:
        equals in class java.lang.Object