@Override
    public String createRiskToken() throws Throwable {
        val jwtBuilder = new JwtBuilder(riskVerificationCipherExecutor,
            applicationContext, servicesManager, principalResolver, casProperties, serviceFactory);
        val expiration = Beans.newDuration(casProperties.getAuthn().getAdaptive()
            .getRisk().getResponse().getRiskVerificationTokenExpiration());
        val expirationDate = DateTimeUtils.dateOf(LocalDateTime.now(Clock.systemUTC()).plus(expiration));
        val attributes = new HashMap<String, List<Object>>();
        attributes.put("clientIpAddress", List.of(clientInfo.getClientIpAddress()));
        attributes.put("userAgent", List.of(clientInfo.getUserAgent()));
        attributes.put("geoLocation", List.of(clientInfo.getGeoLocation()));
        val jwtRequest = JwtBuilder.JwtRequest
            .builder()
            .serviceAudience(Set.of(casProperties.getServer().getPrefix()))
            .subject(authentication.getPrincipal().getId())
            .jwtId(UUID.randomUUID().toString())
            .registeredService(Optional.of(registeredService))
            .issuer(casProperties.getServer().getName())
            .validUntilDate(expirationDate)
            .attributes(attributes)
            .build();
        return jwtBuilder.build(jwtRequest);
    }
This is {@link BaseAuthenticationRiskNotifier}.

@author Misagh Moayyed
@since 5.1.0
support/cas-server-support-electrofence/src/main/java/org/apereo/cas/impl/notify/BaseAuthenticationRiskNotifier.java