com.payneteasy.superfly.security.authentication.EmptyAuthenticationToken Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of superfly-spring-security Show documentation
Show all versions of superfly-spring-security Show documentation
Module for Spring Security which enables application to use Superfly authentication/authorization declaratively through Spring Security
The newest version!
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 extends GrantedAuthority> 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;
}
}