3.2 AuthenticationNamespace

The authentication namespace is an interface used to authenticate to the NDS namespace. It does not apply to any other namespace implementations. AuthenticationNamespace provides the following NDS authentication functionality:

See Also:

3.2.1 Authenticating to NDS

To authenticate, you must first declare the object you are authenticating and the namespace you are authenticating to.

 NetWareNamespace nwns = new NetWareNamespace();
 NDSNamespaceImpl ndsns = new NDSNamespaceImpl();
 

Then you get an object entry for the new object, in this case an unauthenticated NDS tree.

 //Get an object entry from the NetWareNamespace for an un-authenticated tree.
 ObjectEntry objEntry = nwns.getObjectEntry("Smithers_Tree");
 

Then, given the object entry, you can authenticate to NDS using the NDSNamespace interface.

 //Authenticate to the tree using the NDSNamespace.
 ndsns.authenticate(objEntry);
 

See Also:

3.2.2 Setting or Changing an NDS Password

To set a password, you need the object entry. The password is entered by the user at a dialog box.

 //Set the password for a given object entry.
 ndsns.setPassword(objEntry);
 

The operation for changing a password is similar:

 //Change the password for a given object entry.
 ndsns.changePassword(objEntry);
 

See Also:

3.2.3 Logging Out an NDS Object

Logging out a given object entry.

 //Logout for a given object entry.
 ndsns.unAuthenticate(objEntry);
 

See Also:

3.2.4 Getting the Authenticated Identity of an Object

This method looks at an object entry that contains information about an NDS tree, and returns information about a user logged into that tree.

 //Method looks at the tree contained in objEntry and returns an ObjectEntry
 //for the user logged into that tree.
 ObjectEntry userOE = ndsns.getAuthenticatedIdentity(objEntry);
 

See Also: