Package org.apereo.cas.services
Class PrincipalAttributeRegisteredServiceUsernameProvider
java.lang.Object
org.apereo.cas.services.BaseRegisteredServiceUsernameAttributeProvider
org.apereo.cas.services.PrincipalAttributeRegisteredServiceUsernameProvider
- All Implemented Interfaces:
Serializable
,org.apereo.cas.services.RegisteredServiceUsernameAttributeProvider
public class PrincipalAttributeRegisteredServiceUsernameProvider
extends BaseRegisteredServiceUsernameAttributeProvider
Determines the username for this registered service based on a principal attribute.
If the attribute is not found, default principal id is returned.
- Since:
- 4.1.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPrincipalAttributesFromReleasePolicy
(org.apereo.cas.authentication.principal.Principal principal, org.apereo.cas.authentication.principal.Service service, org.apereo.cas.services.RegisteredService registeredService) Gets principal attributes.resolveUsernameInternal
(org.apereo.cas.authentication.principal.Principal principal, org.apereo.cas.authentication.principal.Service service, org.apereo.cas.services.RegisteredService registeredService) Resolve username internal string.Methods inherited from class org.apereo.cas.services.BaseRegisteredServiceUsernameAttributeProvider
encryptResolvedUsername, initialize, removePatternFromUsernameIfNecessary, resolveUsername, scopeUsernameIfNecessary
-
Constructor Details
-
PrincipalAttributeRegisteredServiceUsernameProvider
public PrincipalAttributeRegisteredServiceUsernameProvider()
-
-
Method Details
-
resolveUsernameInternal
public String resolveUsernameInternal(org.apereo.cas.authentication.principal.Principal principal, org.apereo.cas.authentication.principal.Service service, org.apereo.cas.services.RegisteredService registeredService) Description copied from class:BaseRegisteredServiceUsernameAttributeProvider
Resolve username internal string.- Specified by:
resolveUsernameInternal
in classBaseRegisteredServiceUsernameAttributeProvider
- Parameters:
principal
- the principalservice
- the serviceregisteredService
- the registered service- Returns:
- the string
-
getPrincipalAttributesFromReleasePolicy
protected Map<String,List<Object>> getPrincipalAttributesFromReleasePolicy(org.apereo.cas.authentication.principal.Principal principal, org.apereo.cas.authentication.principal.Service service, org.apereo.cas.services.RegisteredService registeredService) Gets principal attributes. Will attempt to locate the principal attribute repository from the context if one is defined to use that instance to locate attributes. If none is available, will use the default principal attributes.- Parameters:
principal
- the principalservice
- the serviceregisteredService
- the registered service- Returns:
- the principal attributes
-