protected JwtBuilder.JwtRequest getJwtRequestBuilder() throws Throwable {
        val authentication = token.getAuthentication();
        val builder = JwtBuilder.JwtRequest.builder();
        val attributes = collectAttributes();
        return builder
            .serviceAudience(determineServiceAudience())
            .issueDate(DateTimeUtils.dateOf(authentication.getAuthenticationDate()))
            .jwtId(token.getId())
            .subject(authentication.getPrincipal().getId())
            .validUntilDate(determineValidUntilDate())
            .attributes(attributes)
            .registeredService(Optional.of(registeredService))
            .issuer(determineIssuer())
            .service(Optional.ofNullable(service))
            .resolveSubject(token.isStateless())
            .build();
    }
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