protected void collectIdToken(final OAuth20AccessTokenResponseResult result,
                                  final OAuth20AccessToken token,
                                  final Map<String, Object> model) {
        val idToken = generateIdToken(result, token);
        if (idToken != null) {
            val idTokenValue = idToken.token();
            LOGGER.debug("Generated ID token [{}] based on grant type [{}]", idTokenValue, result.getGrantType());
            FunctionUtils.doIfNotBlank(idTokenValue, v -> model.put(OidcConstants.ID_TOKEN, v));
            FunctionUtils.doIfNotBlank(idToken.deviceSecret(), v -> model.put(OidcConstants.DEVICE_SECRET, v));
        }
    }
This is {@link OidcAccessTokenResponseGenerator}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-oidc-core-api/src/main/java/org/apereo/cas/oidc/web/OidcAccessTokenResponseGenerator.java