@Override
    public String encode(final String value, final Object[] parameters) {
        if (registeredService instanceof OAuthRegisteredService && shouldEncodeAsJwt()) {
            return FunctionUtils.doUnchecked(() -> {
                val request = getJwtRequestBuilder();
                return configurationContext.getAccessTokenJwtBuilder().build(request);
            });
        }
        return token.getId();
    }
This is {@link OAuth20JwtAccessTokenEncodableCipher}.

@author Misagh Moayyed
@since 7.2.0
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/response/accesstoken/response/OAuth20JwtAccessTokenEncodableCipher.java