The Authenticator enables application level authentication by prompting for user credentials when an authentication request is issued. Authentication is achieved via the Java class com.novell.java.security.Authenticator. The Authenticator uses the underlying requester to perform the actual authentication. The SessionManager and therefore the JNDI providers use the Authenticator for all authentication processes including login and logout. The Authentication service also provides the ability to create and change user passwords.
To take advantage of Network Attached Storage (NAS) login capability, call the setUseNAS method.
Seven samples that demonstrate how to use the Authenticator can be found in Authenticator Samples of Sample Code and Demos. The samples demonstrate how to perform a login, logout, token creation, token modification, token verification, and getting all authenticated identities.
The Authenticator is mechanism and storage independent. It is responsible for managing the authentication process for identities within a JVM. The Authenticator is designed to avoid two common types of application dependencies: authentication mechanism dependence and authentication secrets storage dependency. These design choices were made for two reasons:
By encapsulating the authentication protocols and long-term secret storage within the Authenticator, applications are not built with such dependencies. This provides administrators with the flexibility to decide the type of authentication mechanism employed in the organization, and it enables an organization to design and deploy schemes that can be verified at a particular security level.
For example, suppose a corporation decides on a security policy that uses smart-cards for all authentication within the corporation. After deployment of the smart-card systems an enterprise e-mail system is purchased that employs a password authentication mechanism. To integrate and deploy the e-mail application, the corporation has four choices:
Essentially, the customer either suffers with a less than satisfactory application, or the application distributor loses a customer to one of its competitors.
Since the Authenticator is mechanism and storage independent, applications that use this API do not suffer from these problems.
NOTE:The APIs required for the construction of authentication protocols and long-term authentication secrets are not part of the public release at this time; they will be made public in a future version.
The important components (interfaces and classes) of Authentication are:
All methods of the Authenticator use an Identity class, which can represent any authenticatable object including user objects. A concrete subclass of Identity, which represents the entity being authenticated, should be constructed and passed to the Authenticator. For example, NdsIdentity may be used to specify an authenticatable NDS user. The Login sample shows NdsIdentity being instantiated and later passed to the Authenticator.login() method.
The IdentityScope object is an Identity that can contain many Identities. IdentityScopes are used to hierarchically associate related Identities. For example, NdsIdentityScope is used to specify each NDS context for a user object.
Listed below are some important Authentication methods of which to be aware. For a complete list of available methods, go to the two security packages in the API Reference documentation - com.novell.java.security package and com.novell.service.security package.
The relationship between the Authenticator interfaces and classes is illustrated in the diagram below, followed by a brief description of the relationship each interface and class has with other interfaces and classes.
Figure 2-1 Authentication Interfaces and Classes

In this diagram of interfaces and classes a solid blue line ending with a hollow arrow represents an implementation of an interface. A solid red line ending with a solid arrow represent an extension of a class. The dotted black lines ending with a small solid arrow imply some relationships between the different interfaces and classes. Links are provided to the Reference Guide documentation for each of these important authentication interfaces and classes.