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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionDetermine principal id from attributes.protected String
Digest and encode with salt string.protected static MessageDigest
prepareMessageDigest
(String principal, String service) Prepare message digest message digest.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apereo.cas.authentication.principal.PersistentIdGenerator
generate, generate, generate
-
Constructor Details
-
ShibbolethCompatiblePersistentIdGenerator
-
-
Method Details
-
prepareMessageDigest
Prepare message digest message digest.- Parameters:
principal
- the principalservice
- the service- Returns:
- the message digest
-
generate
- Specified by:
generate
in interfaceorg.apereo.cas.authentication.principal.PersistentIdGenerator
-
generate
- Specified by:
generate
in interfaceorg.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 idattributes
- the attributes- Returns:
- the string
-
toString
-
digestAndEncodeWithSalt
Digest and encode with salt string.- Parameters:
md
- the md- Returns:
- the string
-