Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            OAuth2    oauthContainer = PhishyHelper.getFidorOauth2Container(this.Context.IsDebuggingEnabled);
            APIAccess fidorApi       = new APIAccess();

            fidorApi.GetAccessToken(oauthContainer, null);
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string    responseCode   = Request.QueryString["code"];
            OAuth2    oauthContainer = PhishyHelper.getFidorOauth2Container(this.Context.IsDebuggingEnabled);
            APIAccess fidorApi       = new APIAccess();

            APIAccess.Result status = new APIAccess.Result();

            status.result = -1;
            status.value  = "";
            status        = fidorApi.GetAccessToken(oauthContainer, responseCode);
            if (status.result == 0)
            {
                Session["Access Token"] = status.value;
                Response.Redirect("dashboard/");
            }
        }