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 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 interface org.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

      protected String removePatternFromUsernameIfNecessary(String username)
    • scopeUsernameIfNecessary

      protected String scopeUsernameIfNecessary(String resolved)
    • 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 principal
      service - the service
      registeredService - the registered service
      username - 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 principal
      service - the service
      registeredService - the registered service
      Returns:
      the string