@Override
    protected String encryptToken(final OAuthRegisteredService registeredService,
                                  final String innerJwt) {
        val jsonWebKey = getJsonWebKeyForEncryption(registeredService);
        return JsonWebTokenEncryptor.builder()
            .key(jsonWebKey.getPublicKey())
            .keyId(jsonWebKey.getKeyId())
            .algorithm(registeredService.getIntrospectionEncryptedResponseAlg())
            .encryptionMethod(registeredService.getIntrospectionEncryptedResponseEncoding())
            .allowedAlgorithms(discoverySettings.getIntrospectionEncryptedResponseAlgValuesSupported())
            .allowedContentEncryptionAlgorithms(discoverySettings.getIntrospectionEncryptedResponseEncodingValuesSupported())
            .headers(Map.of(OAuth20Constants.CLIENT_ID, registeredService.getClientId()))
            .build()
            .encrypt(innerJwt);
    }
This is {@link OidcTokenIntrospectionSigningAndEncryptionService}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-oidc-core-api/src/main/java/org/apereo/cas/oidc/profile/OidcTokenIntrospectionSigningAndEncryptionService.java