Code sample: InitAuth - VS

<< Click to Display Table of Contents >>

Navigation:  Reference > Code samples >

Code sample: InitAuth - VS

 

var wsLogin = new AuthServiceClient();

 

AuthType[] authTypes = { AuthType.NO_BuyPass, AuthType.NO_BankID };

 

AuthenticationOptions authOptions = new AuthenticationOptions();

 

authOptions.ReturnSSN = false;

authOptions.AuthTypes = authTypes;

authOptions.NextUrl = @"https://someurl/LoginDone";

authOptions.CancelUrl = @"https://someurl/LoginStart";

 

var loginObj = wsLogin.InitAuth("Contact Signant for DistributorID", "Contact Signant for AccessCode", authOptions);

 

if (loginObj.StatusID == 0)

return Redirect(loginObj.AuthenticationUrl);