Package org.apereo.cas.services
Class RegisteredServicePublicKeyCipherExecutor
java.lang.Object
org.apereo.cas.services.RegisteredServicePublicKeyCipherExecutor
- All Implemented Interfaces:
org.apereo.cas.services.RegisteredServiceCipherExecutor
public class RegisteredServicePublicKeyCipherExecutor
extends Object
implements org.apereo.cas.services.RegisteredServiceCipherExecutor
Default cipher implementation based on public keys.
- Since:
- 4.1
-
Field Summary
Fields inherited from interface org.apereo.cas.services.RegisteredServiceCipherExecutor
CUSTOM_HEADER_REGISTERED_SERVICE_ID, DEFAULT_BEAN_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionEncrypt using the given cipher associated with the service, and encode the data in base 64.protected static byte[]
encodeInternal
(String data, org.apereo.cas.services.RegisteredService registeredService) Encode internally, meant to be called by extensions.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apereo.cas.services.RegisteredServiceCipherExecutor
encode, isEnabled, supports
-
Constructor Details
-
RegisteredServicePublicKeyCipherExecutor
public RegisteredServicePublicKeyCipherExecutor()
-
-
Method Details
-
encodeInternal
protected static byte[] encodeInternal(String data, org.apereo.cas.services.RegisteredService registeredService) Encode internally, meant to be called by extensions. Default behavior will encode the data based on the registered service public key's algorithm usingCipher
.- Parameters:
data
- the dataregisteredService
- the registered service- Returns:
- a byte[] that contains the encrypted result
-
encode
Encrypt using the given cipher associated with the service, and encode the data in base 64.- Specified by:
encode
in interfaceorg.apereo.cas.services.RegisteredServiceCipherExecutor
- Parameters:
data
- the dataservice
- the registered service- Returns:
- the encoded piece of data in base64
-
decode
- Specified by:
decode
in interfaceorg.apereo.cas.services.RegisteredServiceCipherExecutor
-