|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.linar.jintegra.AuthInfo
public class AuthInfo
This class represents information used to authenticate a user. Set the authentication to be used throughout by all threads in the JVM using AuthInfo.setDefault(...) and for the current thread using AuthInfo.setThreadDefault(...); Note that passwords are not stored in instances of this class.
You can also use this class to find out the NT Domain/User of COM clients invoking methods in your Java objects.
For more information, please see Configuring DCOM for Remote Access.
Field Summary | |
---|---|
static int |
IMP_LEVEL_DELEGATE
Delegate level impersonation. |
static int |
IMP_LEVEL_IDENTIFY
Identify level impersonation. |
static int |
IMP_LEVEL_IMPERSONATE
Impersonate level impersonation. |
Constructor Summary | |
---|---|
AuthInfo(java.lang.String domain,
java.lang.String user,
java.lang.String password)
Constructs an AuthInfo instance representing the specified domain, user, and password. |
|
AuthInfo(java.lang.String domain,
java.lang.String user,
java.lang.String password,
int impLevel)
Constructs an AuthInfo instance representing the specified domain, user, password, and authentication level. |
Method Summary | |
---|---|
void |
disableLmResponse()
Disables the sending of Lan Manager(LM) Challenge response when using this AuthInfo instance to connect to a remote COM Component. |
boolean |
equals(java.lang.Object obj)
|
static java.lang.String |
getCallerDomain()
Returns the NT Domain of the COM client that initiated the current call into a Java object. |
static java.lang.String |
getCallerUser()
Returns the NT User name of the COM client that initiated the current call into a Java object. |
int |
hashCode()
|
static boolean |
isCallerAuthenticated()
Indicates whether J-Integra® was able to authenticate the domain/username of the COM client that is invoking a method in a Java object. |
static void |
setDefault(AuthInfo authInfo)
Sets the authentification to be used by default if none is specified when creating or using a COM component. |
static void |
setDefault(java.lang.String domain,
java.lang.String user,
java.lang.String password)
Sets the authentification to be used by default if none is specified when creating or using a COM component. |
static void |
setDefaultImpLevel(int impLevel)
Sets the default impersonation level to be used. |
static void |
setThreadDefault(AuthInfo authInfo)
Sets the authentification to be used by default if none is specified when creating or using a COM component from this thread. |
static void |
setThreadDefault(java.lang.String domain,
java.lang.String user,
java.lang.String password)
Sets the authentification to be used by default if none is specified when creating or using a COM component from this thread. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int IMP_LEVEL_IDENTIFY
public static final int IMP_LEVEL_IMPERSONATE
public static final int IMP_LEVEL_DELEGATE
Constructor Detail |
---|
public AuthInfo(java.lang.String domain, java.lang.String user, java.lang.String password)
domain
- the domain to be used when authenticating using this AuthInfo instanceuser
- the user to be used when authenticating using this AuthInfo instancepassword
- the password to be used when authenticating using this AuthInfo instancepublic AuthInfo(java.lang.String domain, java.lang.String user, java.lang.String password, int impLevel) throws java.lang.RuntimeException
domain
- the domain to be used when authenticating using this AuthInfo instanceuser
- the user to be used when authenticating using this AuthInfo instancepassword
- the password to be used when authenticating using this AuthInfo instanceimpLevel
- the impersonation level to be used when authenticating using this AuthInfo instance
java.lang.RuntimeException
- if an instance of AuthInfo is created in Native ModeMethod Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public void disableLmResponse()
Use this method if you are concerned about weaknesses of the LM Challenge response mechanism, and if you are sure that the AuthInfo instance will only be used to connect to hosts that support NT Challenge Response (such as Windows NT). Windows 95 does not support NT challenge response, so do not call this method if making authenticated connections to servers running under Windows 95.
public static void setDefault(AuthInfo authInfo)
authInfo
- the authentication to be used.public static void setThreadDefault(AuthInfo authInfo)
authInfo
- the authentication to be used.public static java.lang.String getCallerDomain()
public static java.lang.String getCallerUser()
public static boolean isCallerAuthenticated()
public static void setDefaultImpLevel(int impLevel)
impLevel
- the impersonation level to be used by defaultpublic static void setDefault(java.lang.String domain, java.lang.String user, java.lang.String password)
domain
- the domain to be used when authenticating using default authentificationuser
- the user to be used when authenticating using default authentificationpassword
- the password to be used when authenticating using default authentificationpublic static void setThreadDefault(java.lang.String domain, java.lang.String user, java.lang.String password)
domain
- the domain to be used when authenticating using default authentificationuser
- the user to be used when authenticating using default authentificationpassword
- the password to be used when authenticating using default authentificationpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |