Class ShibbolethCompatiblePersistentIdGenerator

java.lang.Object
org.apereo.cas.authentication.principal.ShibbolethCompatiblePersistentIdGenerator
All Implemented Interfaces:
Serializable, org.apereo.cas.authentication.principal.PersistentIdGenerator

public class ShibbolethCompatiblePersistentIdGenerator extends Object implements org.apereo.cas.authentication.principal.PersistentIdGenerator
Generates PersistentIds based on the Shibboleth algorithm. The generated ids are based on a principal attribute is specified, or the authenticated principal id.
Since:
3.1
See Also:
  • Constructor Details

    • ShibbolethCompatiblePersistentIdGenerator

      public ShibbolethCompatiblePersistentIdGenerator(String salt)
    • ShibbolethCompatiblePersistentIdGenerator

      public ShibbolethCompatiblePersistentIdGenerator()
  • Method Details

    • generate

      public String generate(String principal, String service)
      Specified by:
      generate in interface org.apereo.cas.authentication.principal.PersistentIdGenerator
    • generate

      public String generate(org.apereo.cas.authentication.principal.Principal principal, String service)
      Specified by:
      generate in interface org.apereo.cas.authentication.principal.PersistentIdGenerator
    • determinePrincipalIdFromAttributes

      public String determinePrincipalIdFromAttributes(String defaultId, Map<String,List<Object>> attributes)
      Determine principal id from attributes.
      Parameters:
      defaultId - the default id
      attributes - the attributes
      Returns:
      the string
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getSalt

      public String getSalt()
    • getAttribute

      public String getAttribute()
    • setSalt

      public void setSalt(String salt)
    • setAttribute

      public void setAttribute(String attribute)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object