package gov.va.med.esr.webservices.jaxws.spring.security;

import java.util.Collection;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

public class ServiceUserDetails implements UserDetails {

	private static final long serialVersionUID = 4731998149942376918L;

	private String username;
	private String password;
	private boolean accountNonExpired;
	
	public void setAccountNonExpired(boolean accountNonExpired) {
		this.accountNonExpired = accountNonExpired;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public Collection<GrantedAuthority> getAuthorities() {
		return null;
	}

	public String getPassword() {
		return password;
	}

	public String getUsername() {
		return username;
	}

	public boolean isAccountNonExpired() {
		return accountNonExpired;
	}

	public boolean isAccountNonLocked() {
		return isAccountNonExpired();
	}

	public boolean isCredentialsNonExpired() {
		return isAccountNonExpired();
	}

	public boolean isEnabled() {
		return isAccountNonExpired();
	}

}
