Please enable JavaScript to view this site.

Navigation: Reference > Code samples

Code sample: InitAuth - VS

Scroll Prev Top Next More

 

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);