com.novell.emframe.dev.authenticator
Interface iMgrAuthenticator

All Known Implementing Classes:
ManagementServiceSet

public interface iMgrAuthenticator

Interface to implement to become an iManager Authenticator. You would write your own authenticator if you still wanted to write com.novell.emframe.dev.Task plug-ins but needed to provide an alternate authentication mechanism for a back-end service other than eDirectory.


Field Summary
static java.lang.String IMGR_AUTH_HASHMAP
          IMGR_AUTH_HASHMAP = "AuthMap".
static java.lang.String IMGR_AUTH_KEYROOT
          IMGR_AUTH_KEYROOT = "Auth.".
 
Method Summary
 void destroy()
          Called when an authenticator is released from a session.
 java.lang.Object getAttribute(java.lang.Object key)
          Get an attribute that has been added to the authenticator's AuthContext (Hashtable) object.
 AuthContext getAuthContext()
          Returns the AuthContext object that was passed in to the Authenticator's init method.
 void init(java.lang.String sName, AuthContext ac)
          Called when the authenticator is loaded so it can initialize itself.
 boolean isAuthenticated()
          Returns whether authentication has successfully occurred.
 boolean login(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Login using information available in the HttpServletRequest.
 boolean login(java.lang.String sUser, java.lang.String sPwd, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Login using the specified user and password.
 void logout(javax.servlet.http.HttpServletRequest req)
          Called by the framework when it determines that the authenticator must logout.
 void setAttribute(java.lang.Object key, java.lang.Object value)
          Sets an attribute in the authenticator's AuthContext (Hashtable) object.
 

Field Detail

IMGR_AUTH_HASHMAP

public static final java.lang.String IMGR_AUTH_HASHMAP
IMGR_AUTH_HASHMAP = "AuthMap".

See Also:
Constant Field Values

IMGR_AUTH_KEYROOT

public static final java.lang.String IMGR_AUTH_KEYROOT
IMGR_AUTH_KEYROOT = "Auth.".

See Also:
Constant Field Values
Method Detail

destroy

public void destroy()
Called when an authenticator is released from a session. The framework calls this after it calls the logout method. The framework calls logout on all authenticators in a session before it calls destroy.

See Also:
logout(javax.servlet.http.HttpServletRequest)

getAttribute

public java.lang.Object getAttribute(java.lang.Object key)
Get an attribute that has been added to the authenticator's AuthContext (Hashtable) object.

Parameters:
key - Object key to retrieve the value. This is the key that was set when the attribute was added.
Returns:
Object value of the key
See Also:
setAttribute(java.lang.Object, java.lang.Object)

getAuthContext

public AuthContext getAuthContext()
Returns the AuthContext object that was passed in to the Authenticator's init method. Implementing classes should save the AuthContext in a member variable.

Returns:
AuthContext object passed to the init method
See Also:
init(java.lang.String, com.novell.emframe.dev.authenticator.AuthContext)

init

public void init(java.lang.String sName,
                 AuthContext ac)
Called when the authenticator is loaded so it can initialize itself. Implementing classes should save the AuthContext in a member variable.

Parameters:
sName - String containing the profile name (if the authenticator supports multiple profiles)
ac - AuthContext object used to hold instance specific data for an instance of an Authenticator
See Also:
getAuthContext()

isAuthenticated

public boolean isAuthenticated()
Returns whether authentication has successfully occurred.

Returns:
boolean: true if authentication has successfully occurred, false if otherwise

login

public boolean login(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse res)
Login using information available in the HttpServletRequest.

Parameters:
req - The HttpServletRequest object
res - The HttpServletResponse object
Returns:
boolean: true if login was successful, false if otherwise

login

public boolean login(java.lang.String sUser,
                     java.lang.String sPwd,
                     javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse res)
Login using the specified user and password. Any other information is retrieved from the HttpServletRequest.

Parameters:
sUser - String containing the user name or Id to be logged in
sPwd - String containing the password to use to log in
req - The HttpServletRequest object
res - The HttpServletResponse object
Returns:
boolean: true if login was successful, false if otherwise

logout

public void logout(javax.servlet.http.HttpServletRequest req)
Called by the framework when it determines that the authenticator must logout. If you call the logout method, the authenticator will still be held in the session until destroy is called.

Parameters:
req - The current HttpServletRequest (if any) when the logout occurs.
See Also:
destroy()

setAttribute

public void setAttribute(java.lang.Object key,
                         java.lang.Object value)
Sets an attribute in the authenticator's AuthContext (Hashtable) object.

Parameters:
key - Object key to use to identify the object
value - Object to save in the Hashtable
See Also:
getAttribute(java.lang.Object)


API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated September 2 2004 0111.