Ejemplo n.º 1
0
        public JsonResult AddOAuth(int type)
        {
            if (IoCFactory.Instance.TryResolve <IFormAuthentication>().IsAuthentication())
            {
                return(IncRedirectToAction("Index", "Browsio"));
            }


            var            connectorOfType = (ConnectorOfType)type;
            IOAuthProvider oAuthProvider   = IoCFactory.Instance.TryResolveByNamed <IOAuthProvider>(connectorOfType.ToString());
            var            callbackUrl     = GetCallbackOauthUri(connectorOfType);

            return(IncRedirect(oAuthProvider.GetAuthorizationUri(callbackUrl)));
        }