Class AbstractProtocolAttributeEncoder
java.lang.Object
org.apereo.cas.authentication.support.AbstractProtocolAttributeEncoder
- All Implemented Interfaces:
org.apereo.cas.authentication.ProtocolAttributeEncoder
- Direct Known Subclasses:
DefaultCasProtocolAttributeEncoder
public abstract class AbstractProtocolAttributeEncoder
extends Object
implements org.apereo.cas.authentication.ProtocolAttributeEncoder
Abstract class to define common attribute encoding operations.
- Since:
- 4.1.0
-
Field Summary
Modifier and TypeFieldDescriptionprotected final org.apereo.cas.services.ServicesManager
The Services manager.Fields inherited from interface org.apereo.cas.authentication.ProtocolAttributeEncoder
ENCODED_ATTRIBUTE_PREFIX, LOGGER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionencodeAttributes
(Map<String, Object> attributes, org.apereo.cas.services.RegisteredService registeredService, org.apereo.cas.authentication.principal.WebApplicationService webApplicationService) protected abstract void
encodeAttributesInternal
(Map<String, Object> attributes, Map<String, String> cachedAttributesToEncode, org.apereo.cas.services.RegisteredServiceCipherExecutor cipher, org.apereo.cas.services.RegisteredService registeredService, org.apereo.cas.authentication.principal.WebApplicationService webApplicationService) Initialize the cipher with the public key and then start to encrypt select attributes.initialize
(Map<String, Object> attributes) Initialize the encoding process.
-
Field Details
-
servicesManager
protected final org.apereo.cas.services.ServicesManager servicesManagerThe Services manager.
-
-
Constructor Details
-
AbstractProtocolAttributeEncoder
public AbstractProtocolAttributeEncoder()
-
-
Method Details
-
encodeAttributes
public Map<String,Object> encodeAttributes(Map<String, Object> attributes, org.apereo.cas.services.RegisteredService registeredService, org.apereo.cas.authentication.principal.WebApplicationService webApplicationService) - Specified by:
encodeAttributes
in interfaceorg.apereo.cas.authentication.ProtocolAttributeEncoder
-
encodeAttributesInternal
protected abstract void encodeAttributesInternal(Map<String, Object> attributes, Map<String, String> cachedAttributesToEncode, org.apereo.cas.services.RegisteredServiceCipherExecutor cipher, org.apereo.cas.services.RegisteredService registeredService, org.apereo.cas.authentication.principal.WebApplicationService webApplicationService) Initialize the cipher with the public key and then start to encrypt select attributes.- Parameters:
attributes
- the attributescachedAttributesToEncode
- the cached attributes to encodecipher
- the cipher object initialized per service public keyregisteredService
- the registered servicewebApplicationService
- the web application service
-
initialize
Initialize the encoding process. Removes theCasViewConstants.MODEL_ATTRIBUTE_NAME_PRINCIPAL_CREDENTIAL
andCasViewConstants.MODEL_ATTRIBUTE_NAME_PROXY_GRANTING_TICKET
from the authentication attributes originally and into a cache object, so it can later on be encrypted if needed.- Parameters:
attributes
- the new encoded attributes- Returns:
- a map of attributes that are to be encoded and encrypted
-