package eu.dnetlib.enabling.ui.server;

import org.springframework.beans.factory.annotation.Required;

public class AuthenticationManagerSimple implements AuthenticationManager {
	private String username;
	private String password;
	
	
	@Override
	public boolean authenticate(String login, String pwd) {
		if (username == null || username.isEmpty()) return false;
		if (password == null || password.isEmpty()) return false;
		
		if (!username.equals(login)) return false;
		if (!password.equals(pwd)) return false;
		
		return true;
	}
	
	public String getUsername() {
		return username;
	}

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


	public String getPassword() {
		return password;
	}

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

}
