@Override
    public String encode(final OAuthRegisteredService registeredService, final JwtClaims claims) {
        return FunctionUtils.doUnchecked(() -> {
            LOGGER.trace("Attempting to produce token generated for service [{}] with claims [{}]", registeredService, claims.toJson());
            var innerJwt = signTokenIfNecessary(claims, registeredService);
            if (shouldEncryptToken(registeredService)) {
                innerJwt = encryptToken(registeredService, innerJwt);
            }
            return innerJwt;
        });
    }
This is {@link BaseOidcJsonWebKeyTokenSigningAndEncryptionService}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-oidc-core-api/src/main/java/org/apereo/cas/oidc/token/BaseOidcJsonWebKeyTokenSigningAndEncryptionService.java