All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.cloudfoundry.identity.uaa.authentication.event.UnverifiedUserAuthenticationEvent Maven / Gradle / Ivy

There is a newer version: 4.30.0
Show newest version
package org.cloudfoundry.identity.uaa.authentication.event;

import org.cloudfoundry.identity.uaa.audit.AuditEvent;
import org.cloudfoundry.identity.uaa.audit.AuditEventType;
import org.cloudfoundry.identity.uaa.user.UaaUser;
import org.springframework.security.core.Authentication;
import org.springframework.util.Assert;

public class UnverifiedUserAuthenticationEvent extends AbstractUaaAuthenticationEvent {

    private final UaaUser user;

    public UnverifiedUserAuthenticationEvent(UaaUser user, Authentication authentication) {
        super(authentication);
        Assert.notNull(user, "UaaUser object cannot be null");
        this.user = user;
    }

    @Override
    public AuditEvent getAuditEvent() {
        return createAuditRecord(user.getId(), AuditEventType.UnverifiedUserAuthentication, getOrigin(getAuthenticationDetails()),
                user.getUsername());
    }

    public UaaUser getUser() {
        return user;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy