Ignore:
Timestamp:
30.08.2009 18:57:05 (3 years ago)
Author:
stoecker
Message:

fixed #3112 - patch by bastiK - cleanup password hook

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/CredentialsManager.java

    r1958 r2015  
    99 */ 
    1010public interface CredentialsManager { 
     11    enum Key { 
     12        OSM_SERVER_URL("url"),  
     13        USERNAME("username"),  
     14        PASSWORD("password"); 
     15        final private String pname; 
     16        private Key(String name) { 
     17            pname = name; 
     18        } 
     19        @Override public String toString() { 
     20            return pname; 
     21        } 
     22    }; 
     23     
    1124    /** 
    12      * lookupUsername, lookupPassword: 
    13      * 
    1425     * Should throw or return non-null, possibly empty String. 
    1526     */ 
    16     public String lookupUsername() throws CMException; 
    17     public String lookupPassword() throws CMException; 
     27    public String lookup(Key key) throws CMException; 
    1828 
    1929    /** 
    20      * storeUsername, storePassword: 
    21      * 
    2230     * May silently fail to store. 
    2331     */ 
    24     public void storeUsername(String username) throws CMException; 
    25     public void storePassword(String password) throws CMException; 
     32    public void store(Key key, String secret) throws CMException; 
    2633 
    2734    /** 
Note: See TracChangeset for help on using the changeset viewer.