Exemplo n.º 1
0
 /// <summary>
 /// Fixes the response created by the OWIN Security Challenge call to be accepted by DotVVM client library.
 /// </summary>
 public static void ApplyRedirectResponse(IOwinContext context, string redirectUri)
 {
     if (context.Response.StatusCode == (int)HttpStatusCode.Unauthorized)
     {
         DotvvmRequestContext.SetRedirectResponse(context, redirectUri, (int)HttpStatusCode.Redirect);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Ensures the redirect required by the OWIN Security middleware is properly handled by DotVVM client library.
 /// </summary>
 public static void ApplyRedirectResponse(IOwinContext context, string redirectUri)
 {
     if (context.Response.StatusCode == (int)HttpStatusCode.Unauthorized)
     {
         DotvvmRequestContext.SetRedirectResponse(DotvvmMiddleware.ConvertHttpContext(context), redirectUri, (int)HttpStatusCode.Redirect, true);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Ensures the redirect required by the ASP.NET Core Security middleware is properly handled by DotVVM client library.
 /// </summary>
 public static Task ApplyRedirectResponse(HttpContext context, string redirectUri)
 {
     DotvvmRequestContext.SetRedirectResponse(DotvvmMiddleware.ConvertHttpContext(context), redirectUri, (int)HttpStatusCode.Redirect, allowSpaRedirect: false);
     throw new DotvvmInterruptRequestExecutionException();
 }