|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.cenqua.shaj.Authenticator
com.cenqua.shaj.Win32Authenticator
Checks user passwords and group-memebership with a Windows domain or computer.
Note:
For the domain argument, it is best to use the full DNS name of the domain.
For example, corp.example.com. Using the short version (e.g. corp)
may work for checkWin32Password(String, String, String, com.cenqua.shaj.log.Log)
but not for checkWin32GroupMembership(String, String, String, com.cenqua.shaj.log.Log).
This class contains some static methods that can be used if you wish to call to Windows directly.
| Constructor Summary | |
Win32Authenticator()
|
|
| Method Summary | |
boolean |
checkGroupMembership(java.lang.String domain,
java.lang.String username,
java.lang.String group,
Log log)
Tests if a user is a member of a specific group. |
boolean |
checkPassword(java.lang.String domain,
java.lang.String username,
java.lang.String password,
Log log)
Checks a user's password. |
static boolean |
checkWin32GroupMembership(java.lang.String domain,
java.lang.String username,
java.lang.String group,
Log log)
Checks if a user is a member of a group. |
static boolean |
checkWin32Password(java.lang.String domain,
java.lang.String username,
java.lang.String password,
Log log)
Verify a users password against a domain. |
static boolean |
isSupported()
Determines if this Authenticator can be used on the underlying platform. |
| Methods inherited from class com.cenqua.shaj.Authenticator |
getDefault |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Win32Authenticator()
| Method Detail |
public static boolean isSupported()
public boolean checkPassword(java.lang.String domain,
java.lang.String username,
java.lang.String password,
Log log)
Authenticator
checkPassword in class Authenticatordomain - the (platform-specific) domain/service to used to perform the check.
May be null (which has a platform-specific meaning).username - the usernamepassword - the password to verifylog - where to log errors/debugging
public boolean checkGroupMembership(java.lang.String domain,
java.lang.String username,
java.lang.String group,
Log log)
Authenticator
checkGroupMembership in class Authenticatordomain - the (platform-specific) domain/service to used to perform the check.
May be null (which has a platform-specific meaning).username - the username to test for membershipgroup - the group to look inlog - where to log errors/debugging
public static boolean checkWin32Password(java.lang.String domain,
java.lang.String username,
java.lang.String password,
Log log)
Note: Windows appears to ignore domain if the computer is not part of a domain
domain - the windows domain to check against.
If domain is null, then the local computer (or the domain it is attached to) is checked.username - the usernamepassword - the password to verifylog - where to log errors/debugging
java.lang.IllegalArgumentException - if username
or password are null.
java.lang.IllegalStateException - if Shaj did not load correctly (if Shaj.init() returns false).
public static boolean checkWin32GroupMembership(java.lang.String domain,
java.lang.String username,
java.lang.String group,
Log log)
Note: the domain argument should be the fully qualifyied DNS name of the domain.
domain - the windows domain to check against.
If domain is null, then the local computer (or the domain it is attached to) is checked.username - the username to test for membershipgroup - the group to look inlog - where to log errors/debugging
java.lang.IllegalArgumentException - if username
or password are null.
java.lang.IllegalStateException - if Shaj did not load correctly (if Shaj.init() returns false).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||