@Override
    public void handleSuccess(final AuthenticationResponse successResponse) {
        if (StringUtils.isNotBlank(successResponse.getSessionToken())) {
            val user = successResponse.getUser();
            this.username = user.getLogin();

            FunctionUtils.doIfNotNull(successResponse.getSessionToken(), value -> userAttributes.put("oktaSessionToken", CollectionUtils.wrapList(value)));
            FunctionUtils.doIfNotNull(successResponse.getStatusString(), value -> userAttributes.put("oktaStatus", CollectionUtils.wrapList(value)));
            FunctionUtils.doIfNotNull(successResponse.getType(), value -> userAttributes.put("oktaType", CollectionUtils.wrapList(value)));
            FunctionUtils.doIfNotNull(successResponse.getExpiresAt(), value -> userAttributes.put("oktaExpiration", CollectionUtils.wrapList(value)));
            FunctionUtils.doIfNotNull(successResponse.getRecoveryType(), value -> userAttributes.put("oktaRecoveryType", CollectionUtils.wrapList(value)));
            
            user.getProfile().forEach((key, value) -> userAttributes.put(key, CollectionUtils.wrapList(value)));
        } else {
            handleUnauthenticated(successResponse);
        }
    }
This is {@link OktaAuthenticationStateHandlerAdapter}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-okta-authentication/src/main/java/org/apereo/cas/okta/OktaAuthenticationStateHandlerAdapter.java