|
SiteMinder Java SDK r12.51 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.netegrity.policyserver.smapi.UserContext
public class UserContext
Allows a custom object to set and retrieve information about a user in a user directory. The information includes user attributes and directory attributes associated with the user.
The methods for setting and retrieving user directory attributes and for authenticating a user are available only ifisUserContext() returns true.
| Field Summary | |
|---|---|
static int |
DEFAULT_BUFFER_SIZE
The default buffer size is 100 bytes. |
| Constructor Summary | |
|---|---|
UserContext(long lpUserContext)
Construct an UserContext from the SiteMinder context pointers. |
|
UserContext(UserContext userContext)
Construct a user context from a UserContext instance. |
|
| Method Summary | |
|---|---|
java.lang.String |
authenticateUser(java.lang.String password)
Authenticates a user whose context in the user directory has been established. |
java.lang.String |
authenticateUser(java.lang.String password,
int msgBufferSize,
int errBufferSize)
Authenticates a user whose context in the user directory has been established. |
java.lang.String |
getDirNameSpace()
Retrieves the directory namespace, such as LDAP:,
WinNT:, or ODBC:. |
java.lang.String |
getDirPath()
Retrieves the directory path (in SiteMinder notation) of a SiteMinder user directory where the user's context was established. |
java.lang.String |
getDirServer()
Retrieves the directory server of a SiteMinder user directory where user's context was established. |
java.lang.String |
getDnProp(java.lang.String DN,
java.lang.String propName)
Retrieves the value of the specified property of the specified DN. |
java.lang.String |
getDnProp(java.lang.String DN,
java.lang.String propName,
int bufferSize)
Retrieves the value of the specified property of the specified DN. |
java.lang.String |
getProp(java.lang.String propName)
Retrieves the value of the specified user property. |
java.lang.String |
getProp(java.lang.String propName,
int bufferSize)
Retrieves the value of the specified user property. |
java.lang.String |
getSessionID()
Retrieves the session ID that has been or will be assigned to the user's session, depending on whether the session has been established. |
java.lang.String |
getUserName()
Retrieves the full distinguished name of the user. |
java.lang.String |
getUserPath()
Retrieves the user path in SiteMinder notation. |
boolean |
isUserContext()
Indicates that SiteMinder has established the user's identity, and that the user context information is available to retrieve and set. |
int |
setDnProp(java.lang.String DN,
java.lang.String propName,
java.lang.String value)
Sets the property value of a directory object DN. |
int |
setProp(java.lang.String propName,
java.lang.String value)
Sets a value for the specified user property. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_BUFFER_SIZE
The default buffer size is 100 bytes. If a method in this class is affected by the default, the method description will indicate it.
| Constructor Detail |
|---|
public UserContext(long lpUserContext)
lpApiContext - the C++ pointer to lpApiContextpublic UserContext(UserContext userContext)
UserContext instance.
UserContext - The Java UserContext object.| Method Detail |
|---|
public boolean isUserContext()
Indicates that SiteMinder has established the user's identity, and that the user context information is available to retrieve and set.
public java.lang.String getUserName()
Retrieves the full distinguished name of the user.
public java.lang.String getUserPath()
Retrieves the user path in SiteMinder notation.
SiteMinder notation has the following format:
directory-namespace + server + / + user-DN
For example:
ldap://server.company.com/uid=user1,ou=people,o=company.com
public java.lang.String getDirPath()
Retrieves the directory path (in SiteMinder notation) of a SiteMinder user directory where the user's context was established.
public java.lang.String getDirServer()
Retrieves the directory server of a SiteMinder user directory where user's context was established.
public java.lang.String getDirNameSpace()
Retrieves the directory namespace, such as LDAP:,
WinNT:, or ODBC:.
public java.lang.String getSessionID()
Retrieves the session ID that has been or will be assigned to the user's session, depending on whether the session has been established.
public java.lang.String getDnProp(java.lang.String DN,
java.lang.String propName)
Retrieves the value of the specified property of the specified DN. The user whose context has been established must be associated with the DN (for example, the user is a member of a group).
The retrieved property value should be no larger thanDEFAULT_BUFFER_SIZE bytes long.
Larger attributes are truncated to
DEFAULT_BUFFER_SIZE.
DN - The DN of an object in the user directory. The user must
be associated with this DN.propName - The name of the DN property to retrieve.
null if not available.
For information on the format of multiple values
retrieved from a multi-valued LDAP attribute, see
setProp().
public java.lang.String getDnProp(java.lang.String DN,
java.lang.String propName,
int bufferSize)
Retrieves the value of the specified property of the specified DN. The user whose context has been established must be associated with the DN (for example, the user is a member of a group).
The retrieved property value should be no larger than the maximum length specified in thebufferSize parameter.
Larger attributes are truncated to bufferSize.
DN - The DN of an object in the user directory. The user must
be associated with this DN.propName - The name of the DN property to retrieve.bufferSize - The maximum length of the retrieved value.
null if not available.
For information on the format of multiple values
retrieved from a multi-valued LDAP attribute, see
setProp().
public int setDnProp(java.lang.String DN,
java.lang.String propName,
java.lang.String value)
Sets the property value of a directory object DN. The user whose context has been established must be associated with the object (for example, the user is a member of a group).
DN - The DN of an object in the user directory. The user must
be associated with this DN.propName - The name of the DN property to set.value - The value to assign to the DN property.
For information on setting multiple values in this
parameter for an LDAP multi-valued attribute,
see setProp().
public java.lang.String getProp(java.lang.String propName)
Retrieves the value of the specified user property.
The retrieved property value should be no larger thanDEFAULT_BUFFER_SIZE bytes long.
Larger attributes are truncated to
DEFAULT_BUFFER_SIZE.
propName - The name of the user property to retrieve.
null if not available.
For information on the format of multiple values
retrieved from a multi-valued LDAP attribute, see
setProp().
public java.lang.String getProp(java.lang.String propName,
int bufferSize)
Retrieves the value of the specified user property.
The retrieved property value should be no larger than the maximum length specified in thebufferSize parameter.
Larger attributes are truncated to bufferSize.
propName - The name of the user property to retrieve.bufferSize - The maximum length of the retrieved value.
null if not available.
For information on the format of multiple values
retrieved from a multi-valued LDAP attribute, see
setProp().
public int setProp(java.lang.String propName,
java.lang.String value)
Sets a value for the specified user property.
When setting or retrieving multi-valued attributes in an LDAP user store, the values are presented in a single string, delimited by a carat character (^). For example, you might set three different telephone numbers in thevalue parameter as follows:
"111-1234^111-5678^111-0000"
Custom code that sets or retrieves multi-valued attributes must support
the expected multi-valued string format.
propName - The name of the user property to set.value - The value to assign to the user property.
public java.lang.String authenticateUser(java.lang.String password)
throws UserAuthenticationException
Authenticates a user whose context in the user directory has been established.
The returned user message and any possible error text will be no larger thanDEFAULT_BUFFER_SIZE bytes long.
password - The password to verify for this user.
null if authentication fails.
UserAuthenticationException
public java.lang.String authenticateUser(java.lang.String password,
int msgBufferSize,
int errBufferSize)
throws UserAuthenticationException
Authenticates a user whose context in the user directory has been established.
The returned user message will be no larger than the maximum length defined in themsgBufferSize parameter.
password - The password to verify for this user.msgBufferSize - The maximum length of the returned user message.errBufferSize - The maximum length of the error message in a thrown
UserAuthenticationException.
null if authentication fails.
UserAuthenticationException
|
Java SDK r12.51 Mon 04/08/2013 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||