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

com.payneteasy.superfly.security.authentication.EmptyAuthenticationToken Maven / Gradle / Ivy

package com.payneteasy.superfly.security.authentication;

import java.util.Collection;
import java.util.Collections;

import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;

/**
 * Authentication implementation which actually does not auth to anything but
 * just used for something else (like value transport).
 * 
 * @author Roman Puchkovskiy
 */
public class EmptyAuthenticationToken implements Authentication {
    private static final long serialVersionUID = 5670753128479212097L;

    public Collection getAuthorities() {
        return Collections.emptySet();
    }

    public Object getCredentials() {
        return null;
    }

    public Object getDetails() {
        return null;
    }

    public Object getPrincipal() {
        return null;
    }

    public boolean isAuthenticated() {
        return false;
    }

    public void setAuthenticated(boolean isAuthenticated)
            throws IllegalArgumentException {
    }

    public String getName() {
        return null;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy