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 java.lang.Object implements org.apereo.cas.authentication.ProtocolAttributeEncoder
Abstract class to define common attribute encoding operations.- Since:
- 4.1.0
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apereo.cas.services.ServicesManager
servicesManager
The Services manager.
-
Constructor Summary
Constructors Constructor Description AbstractProtocolAttributeEncoder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>
encodeAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes, org.apereo.cas.services.RegisteredService registeredService, org.apereo.cas.authentication.principal.WebApplicationService webApplicationService)
protected abstract void
encodeAttributesInternal(java.util.Map<java.lang.String,java.lang.Object> attributes, java.util.Map<java.lang.String,java.lang.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.protected java.util.Map<java.lang.String,java.lang.String>
initialize(java.util.Map<java.lang.String,java.lang.Object> attributes)
Initialize the encoding process.
-
-
-
Method Detail
-
encodeAttributes
public java.util.Map<java.lang.String,java.lang.Object> encodeAttributes(java.util.Map<java.lang.String,java.lang.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(java.util.Map<java.lang.String,java.lang.Object> attributes, java.util.Map<java.lang.String,java.lang.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
protected java.util.Map<java.lang.String,java.lang.String> initialize(java.util.Map<java.lang.String,java.lang.Object> attributes)
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
-
-