01: // Copyright (C) 2003,2004,2005 by Object Mentor, Inc. All rights reserved.
02: // Released under the terms of the GNU General Public License version 2 or later.
03: package fitnesse.authentication;
04:
05: public class OneUserAuthenticator extends Authenticator {
06: private String theUsername;
07:
08: private String thePassword;
09:
10: public OneUserAuthenticator(String theUsername, String thePassword) {
11: this .theUsername = theUsername;
12: this .thePassword = thePassword;
13: }
14:
15: public boolean isAuthenticated(String username, String password) {
16: return (theUsername.equals(username) && thePassword
17: .equals(password));
18: }
19:
20: public String getUser() {
21: return theUsername;
22: }
23:
24: public String getPassword() {
25: return thePassword;
26: }
27: }
|