/// <summary> /// Gets the URL of the HealthVault Shell authentication page. /// </summary> /// /// <remarks> /// When reading from web.config, this property uses the "HV_ShellUrl" configuration value to construct the /// redirector URL with a target of "AUTH". /// </remarks> /// public static Uri HealthVaultShellAuthenticationUrl(this WebHealthVaultConfiguration config) { var redirect = new ShellRedirectParameters(config.DefaultHealthVaultShellUrl.OriginalString) { TargetLocation = s_authTarget, ApplicationId = config.MasterApplicationId, }; return(redirect.ConstructRedirectUrl()); }
/// <summary> /// Constructs a URL to be redirected to via the HealthVault service Shell /// URL redirector, given the specified redirect parameters. /// </summary> /// /// <param name="redirectParameters"> /// Parameters used to construct the redirect URL. /// </param> /// <returns> /// The constructed URL. /// </returns> /// /// <exception cref="UriFormatException"> /// The specified parameters construct an invalid URL. /// </exception> public static Uri GetHealthServiceShellUrl(ShellRedirectParameters redirectParameters) { ShellRedirectParameters paramsCopy = redirectParameters.Clone(); // apply configuration // aib paramsCopy.AllowInstanceBounce = paramsCopy.AllowInstanceBounce ?? s_configuration.MultiInstanceAware; return(paramsCopy.ConstructRedirectUrl()); }
/// <summary> /// Constructs a URL to be redirected to via the HealthVault service /// Shell URL redirector, given the specified location and query. /// </summary> /// /// <param name="shellUrl"> /// The HealthVault Shell redirector URL. /// </param> /// /// <param name="targetLocation"> /// A known constant indicating the internal HealthVault /// service Shell location to redirect to. /// See <a href="http://msdn.microsoft.com/en-us/library/ff803620.aspx">Shell redirect interface</a>. /// </param> /// /// <param name="targetQuery"> /// The query string value to pass to the URL to which redirection is /// taking place. /// </param> /// /// <remarks> /// The <paramref name="targetLocation"/> is passed as the target /// parameter value to the redirector URL. /// The <paramref name="targetQuery"/> is URL-encoded and /// passed to the redirector URL as the target query string parameter /// value. /// </remarks> /// /// <returns> /// The constructed URL. /// </returns> /// /// <exception cref="UriFormatException"> /// The specific target location constructs an improper URL. /// </exception> /// public static Uri GetHealthServiceShellUrl( Uri shellUrl, string targetLocation, string targetQuery) { var redirect = new ShellRedirectParameters(shellUrl.OriginalString) { TargetLocation = targetLocation, TargetQueryString = targetQuery, TokenRedirectionMethod = "post" }; return(redirect.ConstructRedirectUrl()); }