net.i2p.router.web
Class ConsolePasswordManager
java.lang.Object
net.i2p.util.PasswordManager
net.i2p.router.util.RouterPasswordManager
net.i2p.router.web.ConsolePasswordManager
public class ConsolePasswordManager
- extends RouterPasswordManager
Manage both plaintext and salted/hashed password storage in
router.config.
- Since:
- 0.9.4
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConsolePasswordManager
public ConsolePasswordManager(RouterContext ctx)
checkMD5
public boolean checkMD5(String realm,
String subrealm,
String user,
String pw)
- Straight MD5. Compatible with Jetty.
- Parameters:
realm
- e.g. i2cp, routerconsole, etc.user
- null or "" for no user, already trimmedpw
- plain text, already trimmed
- Returns:
- if pw verified
getMD5
public Map<String,String> getMD5(String realm)
- Get all MD5 usernames and passwords. Compatible with Jetty.
Any "null" user is NOT included..
- Parameters:
realm
- e.g. i2cp, routerconsole, etc.
- Returns:
- Map of usernames to passwords (hex with leading zeros, 32 characters)
saveMD5
public boolean saveMD5(String realm,
String subrealm,
String user,
String pw)
- Straight MD5, no salt
Compatible with Jetty and RFC 2617.
- Parameters:
realm
- The full realm, e.g. routerconsole.auth.i2prouter, etc.subrealm
- to be used in creating the checksumuser
- non-null, non-empty, already trimmedpw
- plain text
- Returns:
- if pw verified