|
|
|
|
Purpose |
Validate the client's user identity with the Server to allow access to financial market and information. | ||||||||
|
|
| ||||||||
|
Call Syntax |
#include <aspen.h> … AspenRequest(GLOBAL_session, ASPEN_ValidateSession, &stopInfo, NULL); … | ||||||||
|
|
| ||||||||
|
Parameters |
Input The input parameter for this services is a pointer to a ASPEN_VALIDATE_INPUT structure that contains the user's name, password and new password if necessary.
Output None. | ||||||||
|
|
| ||||||||
|
Structures |
typedef struct { char username[ASPEN_USER_NAME_SIZE+1]; char password[ASPEN_PASSWORD_SIZE+1]; char newpassword[ASPEN_PASSWORD_SIZE+1]; | ||||||||
|
|
| ||||||||
|
Remarks |
ASPEN_ValidateSession is used to establish a user identity; this identity has an associated entitlement profile that determines financial instruments the session can access. If the Server can authenticate the user-name and password provided, validation occurs.
The ASPEN_ValidateSession service can only be requested on open but not validated sessions. | ||||||||
|
|
| ||||||||
|
Return Value |
| ||||||||
|
|
| ||||||||
|
See Also |
|||||||||
|
|
| ||||||||
|
Example |
int CAspenRequestDlg::DoASPEN_ValidateSession() { ASPEN_ADDRESS serverAddress; ASPEN_VALIDATE_INPUT validateRequest; ASPEN_VALIDATE_OUTPUT validateReply; char IPaddress[20]; server_list *slp = list; int retval; // Connect to Server strcpy(IPaddress, svServerAddr); /* Build Address */ retval = AspenBuildServerAddress(ASPEN_INET, IPaddress, &serverAddress); if (retval != ASPEN_OK) { return retval; } /* Open Session */ retval = AspenRequest(0, ASPEN_OpenSession, (void *)&serverAddress, &slp->server_session); if (retval == ASPEN_OK) { /* Validate Session */ strcpy(validateRequest.username, svUserName); strcpy(validateRequest.password, svPassword); strcpy(validateRequest.newpassword, ""); retval = AspenRequest(slp->server_session, ASPEN_ValidateSession, &validateRequest, &validateReply); } return retval; } |
©2006 Aspen Research Group, Ltd. All rights reserved. Terms of Use.