KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jdesktop > swing > auth > PasswordStore


1 package org.jdesktop.swing.auth;
2
3 /*
4  * $Id: PasswordStore.java,v 1.2 2005/01/28 01:35:06 bino_george Exp $
5  *
6  * Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle,
7  * Santa Clara, California 95054, U.S.A. All rights reserved.
8  */

9
10 /**
11  * PasswordStore specifies a mechanism to store passwords used to authenticate
12  * using the <strong>LoginService</strong>. The actual mechanism used
13  * to store the passwords is left up to the implementation.
14  *
15  * @author Bino George
16  */

17 public interface PasswordStore {
18     
19     /**
20      * Saves a password for future use.
21      *
22      * @param username username used to authenticate.
23      * @param server server used for authentication
24      * @param password password to save
25      */

26     
27     public boolean set(String JavaDoc username, String JavaDoc server, char[] password);
28     /**
29      * Fetches the password for a given server and username
30      * @param username username
31      * @param server server
32      * @return password
33      */

34     public char[] get(String JavaDoc username, String JavaDoc server);
35 }
36
Popular Tags