//[ChildActionOnly] public ActionResult IdentityProvidersWithClientSideCode() { WSFederationAuthenticationModule fam = FederatedAuthentication.WSFederationAuthenticationModule; HrdRequest request = new HrdRequest(fam.Issuer, fam.Realm, context: Request.Url.AbsoluteUri); return PartialView("_IdentityProvidersWithClientSideCode", request); }
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); }
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); }
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)); }