private static SignatureConfiguration getSignatureConfiguration(final RegisteredService registeredService) {
        val signingSecret = getRegisteredServiceJwtSigningSecret(registeredService);
        if (StringUtils.isNotBlank(signingSecret)) {
            val signingAlg = determineSigningAlgorithm(registeredService);
            if (JWSAlgorithm.Family.HMAC_SHA.contains(signingAlg)) {
                val secretBytes = getSecretBytes(signingSecret, areSecretsBase64Encoded(registeredService));
                return new SecretSignatureConfiguration(secretBytes, signingAlg);
            }
            if (JWSAlgorithm.Family.RSA.contains(signingAlg)) {
                val privateKey = getRsaPrivateKey(signingSecret);

                val encryptionSecret = getRegisteredServiceJwtEncryptionSecret(registeredService);
                val publicKey = StringUtils.isNotBlank(encryptionSecret) ? getRsaPublicKey(encryptionSecret) : null;

                val config = new RSASignatureConfiguration();
                config.setAlgorithm(signingAlg);
                config.setPrivateKey(privateKey);
                config.setPublicKey(publicKey);
                return config;
            }
        }
        return null;
    }
Create a JWT authenticator.

@return the jwt authenticator
support/cas-server-support-token-authentication/src/main/java/org/apereo/cas/token/authentication/TokenAuthenticationSecurity.java