|
Buju 0.4 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object biz.bbeans.buju.BServerAccess
A utility for maintaining user ID's and passwords.
Constructor Summary | |
BServerAccess(String propFile)
Create a new BServerAccess using the given access properties file name. |
Method Summary | |
boolean |
allowed(String user,
String password)
Check if the given user with the given password is in the access list. |
static biz.bbeans.usage.BUsage |
getUsage()
Build and return the command line usage for the Main method. |
static void |
main(String[] args)
For usage display on standard output, use -h option. |
void |
put(String user,
String password)
Put the user and password in the access list. |
void |
remove(String user)
Remove the user from the access list. |
void |
store()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BServerAccess(String propFile) throws IOException
propFile
- List of user ID's and password digests.
IOException
- If an I/O exception occurs.Method Detail |
public void put(String user, String password) throws NoSuchAlgorithmException, UnsupportedEncodingException
user
- User ID. Spaces not allowed.password
- Password in clear text.
NoSuchAlgorithmException
- If the encryption algorithm
is not supported.
UnsupportedEncodingException
- If UTF-8 character set
encoding is not supported.public void remove(String user)
user
- User ID. Spaces not allowed.public void store() throws IOException
IOException
public boolean allowed(String user, String password) throws NoSuchAlgorithmException, UnsupportedEncodingException
user
- User ID. Spaces not allowed.password
- Password in clear text.
NoSuchAlgorithmException
- If the encryption algorithm
is not supported.
UnsupportedEncodingException
- If UTF-8 character set
encoding is not supported.public static biz.bbeans.usage.BUsage getUsage()
printUsage(PrintStream ps)
on the returned BUsage object.
- Returns:
- Command line usage.
public static void main(String[] args)
|
Buju 0.4 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |