@Audit(action = AuditableActions.ACCOUNT_REGISTRATION,
        actionResolverName = AuditActionResolvers.ACCOUNT_REGISTRATION_TOKEN_CREATION_ACTION_RESOLVER,
        resourceResolverName = AuditResourceResolvers.ACCOUNT_REGISTRATION_TOKEN_CREATION_RESOURCE_RESOLVER)
    @Override
    public String createToken(final AccountRegistrationRequest registrationRequest) {
        accountRegistrationRequestValidator.validate(registrationRequest);

        val token = UUID.randomUUID().toString();
        val claims = new JwtClaims();
        claims.setJwtId(token);
        claims.setIssuer(casProperties.getServer().getPrefix());
        claims.setAudience(casProperties.getServer().getPrefix());
        val props = casProperties.getAccountRegistration().getCore();
        val minutes = Beans.newDuration(props.getExpiration()).toMinutes();
        claims.setExpirationTimeMinutesInTheFuture((float) minutes);
        claims.setIssuedAtToNow();

        val holder = ClientInfoHolder.getClientInfo();
        if (holder != null) {
            if (props.isIncludeServerIpAddress()) {
                claims.setStringClaim("origin", holder.getServerIpAddress());
            }
            if (props.isIncludeClientIpAddress()) {
                claims.setStringClaim("client", holder.getClientIpAddress());
            }
        }
        val username = accountRegistrationUsernameBuilder.build(registrationRequest);
        claims.setSubject(username);
        registrationRequest.getProperties().forEach(claims::setClaim);
        LOGGER.debug("Creating account registration token for [{}]", username);
        val json = claims.toJson();

        LOGGER.debug("Encoding the generated JSON token...");
        return this.cipherExecutor.encode(json);
    }
This is {@link DefaultAccountRegistrationService}.

@author Misagh Moayyed
@since 6.5.0
support/cas-server-support-account-mgmt-core/src/main/java/org/apereo/cas/acct/DefaultAccountRegistrationService.java