|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnetscape.ldap.beans.LDAPBasePropertySupport
netscape.ldap.beans.LDAPSimpleAuth
public class LDAPSimpleAuth
Invisible Bean that just authenticates a user with a Directory
Server and returns Y or N. It takes a host and port, and then either
a full distinguished name and password, an RDN and directory base, or
a cn value and directory base.
Optionally, a client can register as
a PropertyChangeListener and will be notified when an authentication
completes.
The Bean can be used from JavaScript, as in the following example
where the parameters are taken from HTML text fields in an HTML
form called "input":
Field Summary |
---|
Fields inherited from class netscape.ldap.beans.LDAPBasePropertySupport |
---|
AMBIGUOUS_RESULTS, AUTHENTICATION_ERROR, CONNECT_ERROR, INVALID_PARAMETER, NO_SUCH_OBJECT, OK, PROPERTY_NOT_FOUND |
Constructor Summary | |
---|---|
LDAPSimpleAuth()
Constructor with no parameters |
|
LDAPSimpleAuth(java.lang.String theHost,
int thePort)
Constructor with host and port initializers |
|
LDAPSimpleAuth(java.lang.String theHost,
int thePort,
java.lang.String dn,
java.lang.String password)
Constructor with all required authentication parameters |
Method Summary | |
---|---|
java.lang.String |
authenticate()
Connect to LDAP server using parameters specified in constructor and/or by setting properties and attempt to authenticate. |
void |
authenticate(java.awt.event.ActionEvent x)
|
java.lang.String |
authenticate(java.lang.String dn,
java.lang.String password)
Connect to LDAP server using parameters specified in constructor and/or by setting properties and attempt to authenticate. |
static void |
main(java.lang.String[] args)
The main body if we run it as stand-alone application. |
Methods inherited from class netscape.ldap.beans.LDAPBasePropertySupport |
---|
addPropertyChangeListener, connect, convertToString, firePropertyChange, getAuthDN, getAuthPassword, getBase, getDebug, getErrorCode, getFilter, getHost, getPort, getScope, getUserID, getUserName, printDebug, removePropertyChangeListener, setAuthDN, setAuthPassword, setBase, setDebug, setDefaultReferralCredentials, setErrorCode, setFilter, setHost, setPort, setScope, setUserID, setUserName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LDAPSimpleAuth()
public LDAPSimpleAuth(java.lang.String theHost, int thePort)
theHost
- host stringthePort
- port numberpublic LDAPSimpleAuth(java.lang.String theHost, int thePort, java.lang.String dn, java.lang.String password)
theHost
- host stringthePort
- port numberdn
- fully qualified distinguished name to authenticatepassword
- password for authenticating the dnMethod Detail |
---|
public java.lang.String authenticate()
public java.lang.String authenticate(java.lang.String dn, java.lang.String password)
dn
- fully qualified distinguished name to authenticatepassword
- password for authenticating the dn
public void authenticate(java.awt.event.ActionEvent x)
public static void main(java.lang.String[] args)
args
- list of arguments
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |