public static bool LogOff() { var authorization = new Authorization.Authorization(); authorization.LogoffVkontakteUser(); return(true); }
protected void Page_Load(object sender, EventArgs e) { if (Request["action"] == "AuthorizationVkontakte") { string uid = Request["uid"]; string first_name = Server.UrlDecode(Request["first_name"]); string last_name = Server.UrlDecode(Request["last_name"]); string photo = Request["photo"]; string photo_rec = Request["photo_rec"]; string hash = Request["hash"]; if (Request["hash"] == Utils.CalculateMD5Hash("3111027" + uid + "FSApuxGl1jU3CpgG1Fra")) { var authorization = new Authorization.Authorization(); if (!authorization.AuthorizeVkontakteUser(uid, first_name, last_name, photo, photo_rec, hash)) { Response.Redirect("AuthorizationVkontakteFailed.aspx", true); } } else { Response.Redirect("AuthorizationVkontakteFailed.aspx", true); } string strRedirect; strRedirect = Request["ReturnUrl"]; if (strRedirect == null) { strRedirect = "/"; } Response.Redirect(strRedirect, true); } else { Response.Redirect("AuthorizationVkontakteFailed.aspx", true); } }