Example #1
0
        //[ChildActionOnly]
        public ActionResult IdentityProvidersWithClientSideCode()
        {
            WSFederationAuthenticationModule fam = FederatedAuthentication.WSFederationAuthenticationModule;
            HrdRequest request = new HrdRequest(fam.Issuer, fam.Realm, context: Request.Url.AbsoluteUri);

            return PartialView("_IdentityProvidersWithClientSideCode", request);
        }
Example #2
0
        public ActionResult IdentityProvidersWithServerSideCode()
        {
            WSFederationAuthenticationModule fam = FederatedAuthentication.WSFederationAuthenticationModule;
            HrdRequest request = new HrdRequest(fam.Issuer, fam.Realm, context: Request.Url.AbsoluteUri);

            IEnumerable<HrdIdentityProvider> hrdIdentityProviders = hrdClient.GetHrdResponse(request);

            return PartialView("_IdentityProvidersWithServerSideCode", hrdIdentityProviders);
        }
Example #3
0
        public virtual IEnumerable<HrdIdentityProvider> GetHrdResponse(HrdRequest request)
        {
            WebClient client = new WebClient();
            client.Encoding = Encoding.UTF8;

            string response = client.DownloadString(request.GetUrlWithQueryString());

            JavaScriptSerializer serializer = new JavaScriptSerializer();
            return serializer.Deserialize<List<HrdIdentityProvider>>(response);
        }
Example #4
0
        public virtual IEnumerable <HrdIdentityProvider> GetHrdResponse(HrdRequest request)
        {
            WebClient client = new WebClient();

            client.Encoding = Encoding.UTF8;

            string response = client.DownloadString(request.GetUrlWithQueryString());

            JavaScriptSerializer serializer = new JavaScriptSerializer();

            return(serializer.Deserialize <List <HrdIdentityProvider> >(response));
        }