The OTDS package provides services for manipulating
authentication with Open Text Directory Services. It is advised to use the OScript entry points as defined in the OTDSIntegration:Root:ClientUtils object when possible. The major
functionalities offered in the OTDS Package are the following:

-
Connect( CAPILOGIN login )
- Opens a connection to the configured OTDS server if no connection exists.
-
Disconnect()
- Closes the existing connection to the OTDS server.
-
GetResources( String filter )
- Queries the connected OTDS server for all it’s available resources narrowing the scope using the specified filter.
-
LoginRequestTicketForResource( String username, String password, String resourceID )
- Returns an encoded ticket for authenticated username and password on the specified resourceID.
-
RequestTicketForResource( String token, String resourceID )
- Returns an encoded ticket for the specified resourceID. Requires the existing user's encoded token generated from an original ticket validation.
-
RequestTicketForUser( String ticket, String username, String resourceID )
- Returns an encoded ticket for the specified resourceID while impersonating username. Requires the existing user's validated ticket ticket.
-
SSOCookieDomain()
- Returns the current OTDS single sign on cookie domain.
-
ValidateTicket( String ticket )
- Validate an incoming ticket for the currently connected resource.

Connect
Boolean Connect(
CAPILOGIN login
)
Opens a connection to the configured OTDS server if no connection exists.
- Parameters:
-
| login |
- |
A valid CAPILOGIN object. |
- Returns:
- Returns TRUE on success, FALSE on failure.
Disconnect
Boolean Disconnect()
Closes the existing connection to the OTDS server.
- Returns:
- Returns TRUE on success, FALSE on failure.
GetResources
RecArray GetResources(
String filter
)
Queries the connected OTDS server for all it’s available resources narrowing the scope using the specified filter.
- Parameters:
-
| filter |
- |
A filter narrowing the scope of search. |
- Returns:
- Returns a recarray with the following row structure:
| CommonName |
- |
String |
| DisplayName |
- |
String |
| URI |
- |
String |
| Location |
- |
String |
| ConnectionParam |
- |
String |
| FieldMapping |
- |
String |
| ResourceState |
- |
String |
| ResourceType |
- |
String |
| ResourceID |
- |
String |
| IsActivated |
- |
Boolean |
LoginRequestTicketForResource
String LoginRequestTicketForResource(
String username
,
String password
,
String resourceID
)
Returns an encoded ticket for authenticated username and password on the specified resourceID.
- Parameters:
-
| username |
- |
A valid OTDS username |
| password |
- |
A valid OTDS password |
| resourceID |
- |
A valid OTDS resourceID |
- Returns:
- Returns an encoded ticket for the resource on successful authentication of the specified user.
Port
String Port()
Returns the currently registered OTDS port.
- Returns:
- Returns the currently registered OTDS port.
RequestTicketForUser
String RequestTicketForUser(
String username
,
String resourceID
,
String ticket
)
Returns an encoded ticket for the specified resourceID while impersonating username. Requires the existing user's ticket.
For Anonymous authentication the ticket can be Undefined.
- Parameters:
-
| username |
- |
A user to impersonate on the target resourceID. |
| resourceID |
- |
A valid OTDS target resourceID |
| ticket |
- |
An OPTIONAL parameter. A valid, authenticated OTDS ticket, or Undefined for Anonymous authentication. |
- Returns:
- Returns an encoded OTDS ticket for the specified resource and impersonated username.
RequestTicketForResource
String RequestTicketForResource(
String token
,
String resourceID
)
Returns an encoded ticket for the specified resourceID. Requires the existing users encoded token generated from an original ticket validation.
- Parameters:
-
| token |
- |
A valid token generated from the validation of an OTDS ticket. |
| resourceID |
- |
A valid OTDS resourceID |
- Returns:
- Returns an encoded ticket for the resource on successful authentication of the specified user.
SSOCookieDomain
String SSOCookieDomain()
Returns the current OTDS single sign on cookie domain.
- Returns:
- Returns the current OTDS single sign on cookie domain.
ValidateTicket
Assoc ValidateTicket(
String ticket
)
Validate an incoming ticket for the currently connected resource.
- Parameters:
-
| ticket |
- |
A valid OTDS encoded ticket. |
- Returns:
- Returns an assoc with the following structure:
| Token |
- |
String |
| CipherText |
- |
Bytes [CipherText is used to request OTDS Tickets] |
| ResourceID |
- |
String |
| UserID |
- |
String |
| IsValid |
- |
Boolean |
| CredentialUserName |
- |
String |
| CredentialPassword |
- |
String |