protected void Page_Load(object sender, EventArgs e) { DMCIndentityManagement id = new DMCIndentityManagement(); iKey = id.iKey; aKey = id.aKey; sKey = id.sKey; hostname = id.hostname; username = Page.User.Identity.Name; client = GetCompany(username); sig_request = Duo.Web.SignRequest(iKey, sKey, aKey, username); }
protected void Page_Load(object sender, EventArgs e) { NameValueCollection nvc = Request.Form; if (!string.IsNullOrEmpty(nvc["sig_response"])) { DMCIndentityManagement id = new DMCIndentityManagement(); iKey = id.iKey; aKey = id.aKey; sKey = id.sKey; hostname = id.hostname; username = Duo.Web.VerifyResponse(iKey,sKey,aKey,nvc["sig_response"]); if (username == "") { // bail out ok = false; } else { // Auth ok ok = true; } } }