Rev 1015 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1015 | dev | 1 | package ak.hostadmiral.core.model; |
2 | |||
3 | import ak.hostadmiral.util.ModelException; |
||
4 | |||
5 | /** |
||
6 | * A password store must implement java.lang.Cloneable interface. |
||
7 | */ |
||
8 | public interface PasswordStore |
||
9 | { |
||
10 | /** |
||
11 | * returns digest name, e.g. "MD5" |
||
12 | */ |
||
13 | public String getDigest(); |
||
14 | |||
15 | /** |
||
1082 | dev | 16 | * returns true if the store is able to return the original password |
17 | */ |
||
18 | public boolean getReversable(); |
||
19 | |||
20 | /** |
||
1015 | dev | 21 | * to store to persistent store |
22 | */ |
||
23 | public String getPassword(); |
||
24 | |||
25 | /** |
||
26 | * to store from persistent store |
||
27 | */ |
||
28 | public void setPassword(String password); |
||
29 | |||
30 | /** |
||
31 | * to set by user |
||
32 | */ |
||
33 | public void setNewPassword(String password) |
||
34 | throws ModelException; |
||
35 | |||
36 | public boolean checkPassword(String password) |
||
37 | throws ModelException; |
||
1082 | dev | 38 | |
39 | /** |
||
40 | * return the password in plain text if possible |
||
41 | */ |
||
42 | public String getOriginalPassword() |
||
43 | throws UnsupportedOperationException; |
||
1015 | dev | 44 | } |