private static EncryptionMethod determineEncryptionMethod(final RegisteredService registeredService) {
        val encryptionMethods = new HashSet<Algorithm>();
        encryptionMethods.addAll(EncryptionMethod.Family.AES_CBC_HMAC_SHA);
        encryptionMethods.addAll(EncryptionMethod.Family.AES_GCM);
        val encryptionMethod = getRegisteredServiceJwtProperty(registeredService, RegisteredServiceProperties.TOKEN_SECRET_ENCRYPTION_METHOD);
        val encryptionSecretMethod = StringUtils.defaultIfBlank(encryptionMethod, EncryptionMethod.A192CBC_HS384.getName());
        return findAlgorithmFamily(encryptionMethods, encryptionSecretMethod, EncryptionMethod.class);
    }
Create a JWT authenticator.

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