Oracle® Mail Java API Reference
10g Release 1 (10.1.1)

B14492-01

oracle.mail
Class OESLoginContext

java.lang.Object
  |
  +--oracle.mail.OESLoginContext

public class OESLoginContext
extends java.lang.Object
implements ESDSAccess

This class accepts the user credentials and authenticates against the LDAP directory. If successfully authenticated, a directory context will be created for the user based on the user type. supported user types are mailuser and app.

Users can pass this login context to any email server SDK that requires user credentials.


Method Summary
boolean authenticate(java.lang.String appDN, java.lang.String oraHome)
Deprecated.
boolean authenticate(java.lang.String clientUserName, java.lang.String clientPassword, OESLoginContext appContext)
Deprecated.
boolean authenticate(java.lang.String clientUserName, java.lang.String clientPassword, java.lang.String[] toCache, OESLoginContext appContext)
Deprecated.
boolean authenticate(java.lang.String userName, java.lang.String password, java.lang.String ldapHost, int ldapPort)
Deprecated.
boolean authenticate(java.lang.String userName, java.lang.String proxyUserDN, java.lang.String proxyPassword, java.lang.String ldapHost, int ldapPort)
Deprecated. - proxy authentication is no longer supported.
boolean authenticateUMAdmin(java.lang.String ldaphost, java.lang.String ldapport, java.lang.String umAdminPassword)
This method checks if the password of UMADMIN is correct or not.
ESDSDirServerAccess getDirectoryAccess()
Returns an object used to access Email Server Directory information
ESDSContext getDirectoryContext()
returns the directory context.
OESContext getOESContext()
java.lang.String getUserDomain()
returns the domain of the user.
java.lang.String getUserName()
returns the user name.
java.lang.String getUserType()
boolean isAuthenticated()

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

authenticate

public boolean authenticate(java.lang.String userName,
                            java.lang.String password,
                            java.lang.String ldapHost,
                            int ldapPort)
                     throws OESException
Deprecated.
Authenticates the user by taking username, password, hostname on which the directory server is running and the port number. Deprecating it to make sure that it can later be made protected
Parameters:
userName - user_name@domain_name or DN of the 'app' user.
password - user password.
ldapHost - hostname on which the LDAP server containing the mail user information is running.
ldapPort - port number on which the LDAP server is listening.
Returns:
true if successfully authenticated, false otherwise.
Throws:
OESException - if bad argument. Middle tier applications like webmail, who doesn't have their own entry in the directory may pass iasadmin DN/password with user type 'app'.

authenticate

public boolean authenticate(java.lang.String userName,
                            java.lang.String proxyUserDN,
                            java.lang.String proxyPassword,
                            java.lang.String ldapHost,
                            int ldapPort)
                     throws OESException
Deprecated. - proxy authentication is no longer supported.
This method creates the directory context for the mail users/servers through proxy authentication.

caller should pass a proxy user DN and the proxy user password to establish a directory connection for the mailuser/server/application.

Parameters:
userName - - user_name@domain_name for mailusers (OR) DN of the servers.
proxyUserDN - DN of the proxy user.
proxyPassword - proxy user password.
ldapHost - hostname on which the LDAP server containing the mail user information is running.
ldapPort - port number on which the LDAP server is listening.
Returns:
true if successfully authenticated, false otherwise.
Throws:
OESException - if bad argument. NOTES:- servers should pass their own DN and use the iasadmin user as the proxy.

authenticate

public boolean authenticate(java.lang.String clientUserName,
                            java.lang.String clientPassword,
                            java.lang.String[] toCache,
                            OESLoginContext appContext)
                     throws OESException
Deprecated.
This method creates the login context for the clients by taking their applications's login context. Before calling this method, application should have already been authenticated. created client's directory context will have a reference to the applications's context and makes use of it's directory connection pool.

NOTE:- if the client password is null, then it is assumed that the client has already been authenticated by other means such as SSO and a client context will still be created, if the provided appContext is valid. Deprecating it to make sure that it can later be made protected

Parameters:
clientUserName - client user name as user_name@domain_name.
clientPassword - password of the client user.
toCache - list of attribute names to cache in ctx
appContext - login context of the application.
Returns:
true if successfully authenticated, false otherwise.
Throws:
OESException - if bad argument.

authenticate

public boolean authenticate(java.lang.String clientUserName,
                            java.lang.String clientPassword,
                            OESLoginContext appContext)
                     throws OESException
Deprecated.
This method creates the login context for the clients by taking their applications's login context. Before calling this method, application should have already been authenticated. created client's directory context will have a reference to the applications's context and makes use of it's directory connection pool.

NOTE:- if the client password is null, then it is assumed that the client has already been authenticated by other means such as SSO and a client context will still be created, if the provided appContext is valid. Deprecating it to make sure that it can later be made protected

Parameters:
clientUserName - client user name as user_name@domain_name.
clientPassword - password of the client user.
appContext - login context of the application.
Returns:
true if successfully authenticated, false otherwise.
Throws:
OESException - if bad argument.

authenticateUMAdmin

public boolean authenticateUMAdmin(java.lang.String ldaphost,
                                   java.lang.String ldapport,
                                   java.lang.String umAdminPassword)
                            throws OESException
This method checks if the password of UMADMIN is correct or not.
Parameters:
umAdminPassword - password of the client user.
appContext - login context of the application.
Returns:
true if successfully authenticated, false otherwise.
Throws:
OESException - if bad argument.

authenticate

public boolean authenticate(java.lang.String appDN,
                            java.lang.String oraHome)
                     throws OESException
Deprecated.
This method creates the login context for the applications by accepting the application's DN and the oracle home. Deprecating it to make sure that it can later be made protected
Parameters:
appDN - DN of the application.
oraHome - Oracle home directory path.
Returns:
true if successfully authenticated, false otherwise.
Throws:
OESException - if bad argument. Notes:- applications who doesn't have a user entry in the directory may pass null for the appDN.

getUserName

public java.lang.String getUserName()
returns the user name.
Returns:
user name.

getUserDomain

public java.lang.String getUserDomain()
returns the domain of the user. only mail users are guaranteed to have the domain information.
Returns:
user Domain if available, null otherwise.

getUserType

public java.lang.String getUserType()
Returns:
type of the user (i.e "mailuser" or "app")

getDirectoryContext

public ESDSContext getDirectoryContext()
returns the directory context.
Specified by:
getDirectoryContext in interface ESDSAccess
Returns:
directory context.

getDirectoryAccess

public ESDSDirServerAccess getDirectoryAccess()
Description copied from interface: ESDSAccess
Returns an object used to access Email Server Directory information
Specified by:
getDirectoryAccess in interface ESDSAccess
Tags copied from interface: ESDSAccess
See Also:
ESDSDirServerAccess

isAuthenticated

public boolean isAuthenticated()
Returns:
true if the user is authenticated, false otherwise.

getOESContext

public OESContext getOESContext()

Oracle® Mail Java API Reference
10g Release 1 (10.1.1)

B14492-01

Copyright © 1988, 2005, Oracle. All rights reserved.