private static RequestAuthentication ( System.Web.HttpContextBase httpContext, string identityProviderUrl, string realm, string replyUrl ) : void | ||
httpContext | System.Web.HttpContextBase | |
identityProviderUrl | string | |
realm | string | |
replyUrl | string | |
return | void |
private static void RequestAuthentication(HttpContextBase httpContext, string identityProviderUrl, string realm, string replyUrl)
{
var signIn = new SignInRequestMessage(new Uri(identityProviderUrl), realm)
{
Context = replyUrl,
Reply = replyUrl
};
var redirectUrl = signIn.WriteQueryString();
Logger.Info(string.Format("RequestAuthentication! redirectUrl: {0}", redirectUrl));
httpContext.Response.Redirect(redirectUrl, false);
httpContext.ApplicationInstance.CompleteRequest();
}