WCF
...
Code Block | ||||
---|---|---|---|---|
| ||||
AuthServerSessionTokensResponse IsSessionTokenValid(string authServerPartnerLoginName,
string authServerPartnerLoginPassword,
string authServerPartnerUserLoginName,
string sessionTokenId); |
WCF parameter | data type | description |
---|---|---|
authServerPartnerLoginName | string | SurePassId SurePassID account login name |
authServerPartnerLoginPassword | string | SurePassId SurePassID account login key |
authServerPartnerUserLoginName | string | User Optional user account login name. Can be left blank |
sessionTokenId | ||
string | The tokenId to be checked for validity. The tokenId is returned to the user following the CreateSessionToken method |
Code Block | ||||
---|---|---|---|---|
| ||||
AuthServerSessionTokensResponse resp = IsSessionTokenValid("accountLogin",
"accountKey",
string.Empty,
"245dwfweee**fwerwrfwdd4"); |
Code Block | ||||
---|---|---|---|---|
| ||||
if (resp.ErrorCode != 0) { message.Text = resp.ErrorMsg; return false; } |
...
REST
REST parameter | data type | description | |||
---|---|---|---|---|---|
spAccountLoginName | string | SurePassId SurePassID account login name | |||
spAccountLoginKey | string | SurePassId SurePassID account login key | |||
username | string | optional user account login name | |||
type | string | p1 | is_session_token_valid | ||
sessionTokenId | string | The tokenId to be checked for validity. The tokenId is returned to the user following the CreateSessionToken method |
Code Block | ||||
---|---|---|---|---|
| ||||
{
"username": "Mark",
"spAccountLoginName": "accountLogin",
"spAccountLoginKey": "accountKey",
"type": "is_session_token_valid",
"sessionTokenId": "234234gedf46776547dddd6y54765yerwf"
} |
Code Block | ||||
---|---|---|---|---|
| ||||
...
{
"errorCode": 0,
"errorMessage": "OK",
"type": "is_session_token_valid"
} |