Create Session Token

WCF


Method
 AuthServerSessionTokensResponseCreate CreateSessionToken(string authServerPartnerLoginName,
            string authServerPartnerLoginPassword,
            string authServerPartnerUserLoginName,
            string authServerPartnerUserLoginPassword,
            short durationMinutes,
            int tokenType);
WCF parameterdata typedescription
authServerPartnerLoginNamestringSurePassID account login name
authServerPartnerLoginPasswordstringSurePassID account login key
authServerPartnerUserLoginNamestringUser account login name
durationMinutesshortLength of time before the token expires
tokenTypeint0=SurePass Sso, 1= SurePass Mobile
Sample WCF C# Method
 AuthServerSessionTokensResponseCreate resp = CreateSessionToken("accountLogin",
            "accountKey",
            "Mandy,
            string.Empty,
            30,
            1);
Sample WCF C# Repsonse
 if (resp.ErrorCode != 0)  {      
       message.Text = resp.ErrorMsg;
       return false;
 }


REST


REST parameterdata typedescription
spAccountLoginNamestringSurePassID account login name
spAccountLoginKeystringSurePassID account login key
usernamestringuser account login name
typestringcreate_session_token
pwstringoptional password for the account
sessionTokenDurationMinutesstringdurationMinutes
sessionTokenTypestring0=SurePassSso, 1= SurePassMobile
Sample REST/Json Method
 {
  "username": "Mandy",
  "spAccountLoginName": "accountLogin",
  "spAccountLoginKey": "accountKey",
  "type": "create_session_token",
  "pw": "",
  "sessionTokenDurationMinutes": "30",
  "sessionTokenType": "0",
}
Sample REST/Json Response
 {
  "errorCode": 0,
  "errorMessage": "OK",
  "type": "create_session_token"
}