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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    decode(String data, Optional<org.apereo.cas.services.RegisteredService> service)
     
    encode(String data, Optional<org.apereo.cas.services.RegisteredService> service)
    Encrypt 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 using Cipher.
      Parameters:
      data - the data
      registeredService - the registered service
      Returns:
      a byte[] that contains the encrypted result
    • encode

      public String encode(String data, Optional<org.apereo.cas.services.RegisteredService> service)
      Encrypt using the given cipher associated with the service, and encode the data in base 64.
      Specified by:
      encode in interface org.apereo.cas.services.RegisteredServiceCipherExecutor
      Parameters:
      data - the data
      service - the registered service
      Returns:
      the encoded piece of data in base64
    • decode

      public String decode(String data, Optional<org.apereo.cas.services.RegisteredService> service)
      Specified by:
      decode in interface org.apereo.cas.services.RegisteredServiceCipherExecutor