private void btnLink_Click(object sender, EventArgs e) { if (username.Text.Length == 0) { MessageBox.Show("Please enter a username!"); return; } var myCallback = new SezameLinkCallbackType(linkCallback); _manager.link(username.Text, myCallback); }
public async Task link(string username, SezameLinkCallbackType callback) { var webRequestHandler = new WebRequestHandler(); webRequestHandler.ClientCertificates.Add(certificate); // X509Certificate var invoker = new SezameAuthenticationServiceInvoker(webRequestHandler, true); var linkResponse = await invoker.LinkAsync(username); var id = linkResponse.GetParameter(SezameResultKey.Id); var clientcode = linkResponse.GetParameter(SezameResultKey.ClientCode); callback(id, clientcode); }