KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > chatserver > QsAdminAuthenticator


1 /*
2  * This file is part of the QuickServer library
3  * Copyright (C) 2003-2005 QuickServer.org
4  *
5  * Use, modification, copying and distribution of this software is subject to
6  * the terms and conditions of the GNU Lesser General Public License.
7  * You should have received a copy of the GNU LGP License along with this
8  * library; if not, you can download a copy from <http://www.quickserver.org/>.
9  *
10  * For questions, suggestions, bug-reports, enhancement-requests etc.
11  * visit http://www.quickserver.org
12  *
13  */

14
15 package chatserver;
16
17 import org.quickserver.net.server.*;
18 import java.io.*;
19 import java.util.*;
20 import org.quickserver.net.qsadmin.Authenticator;
21
22 /**
23  * ChatServer Authenticator.
24  * <p>
25  * Username : MyAdmin<br>
26  * Password : password
27  * </p>
28  * @since 1.1
29  * @author Akshathkumar Shetty
30  */

31 public class QsAdminAuthenticator extends Authenticator {
32
33     protected static boolean validate(String JavaDoc username, byte[] password) {
34         return username.equals("MyAdmin") &&
35             Arrays.equals(password,"password".getBytes());
36     }
37 }
38
Popular Tags