Package org.apereo.cas.services
Class BaseRegisteredServiceUsernameAttributeProvider
java.lang.Object
org.apereo.cas.services.BaseRegisteredServiceUsernameAttributeProvider
- All Implemented Interfaces:
Serializable
,org.apereo.cas.services.RegisteredServiceUsernameAttributeProvider
- Direct Known Subclasses:
AnonymousRegisteredServiceUsernameAttributeProvider
,DefaultRegisteredServiceUsernameProvider
,GroovyRegisteredServiceUsernameProvider
,PrincipalAttributeRegisteredServiceUsernameProvider
public abstract class BaseRegisteredServiceUsernameAttributeProvider
extends Object
implements org.apereo.cas.services.RegisteredServiceUsernameAttributeProvider
- Since:
- 5.1.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
encryptResolvedUsername
(org.apereo.cas.authentication.principal.Principal principal, org.apereo.cas.authentication.principal.Service service, org.apereo.cas.services.RegisteredService registeredService, String username) Encrypt resolved username.void
Initializes the registered service with default values for fields that are unspecified.protected String
removePatternFromUsernameIfNecessary
(String username) final String
resolveUsername
(org.apereo.cas.authentication.principal.Principal principal, org.apereo.cas.authentication.principal.Service service, org.apereo.cas.services.RegisteredService registeredService) protected abstract String
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.protected String
scopeUsernameIfNecessary
(String resolved)
-
Constructor Details
-
BaseRegisteredServiceUsernameAttributeProvider
public BaseRegisteredServiceUsernameAttributeProvider()
-
-
Method Details
-
resolveUsername
public final String resolveUsername(org.apereo.cas.authentication.principal.Principal principal, org.apereo.cas.authentication.principal.Service service, org.apereo.cas.services.RegisteredService registeredService) - Specified by:
resolveUsername
in interfaceorg.apereo.cas.services.RegisteredServiceUsernameAttributeProvider
-
initialize
public void initialize()Initializes the registered service with default values for fields that are unspecified. Only triggered by JPA. -
removePatternFromUsernameIfNecessary
-
scopeUsernameIfNecessary
-
encryptResolvedUsername
protected String encryptResolvedUsername(org.apereo.cas.authentication.principal.Principal principal, org.apereo.cas.authentication.principal.Service service, org.apereo.cas.services.RegisteredService registeredService, String username) Encrypt resolved username.- Parameters:
principal
- the principalservice
- the serviceregisteredService
- the registered serviceusername
- the username- Returns:
- the encrypted username or null
-
resolveUsernameInternal
protected abstract String 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.- Parameters:
principal
- the principalservice
- the serviceregisteredService
- the registered service- Returns:
- the string
-