예제 #1
0
 public virtual async Task <HttpHandlerResult> OnUnauthorizedAsync(CancellationToken token)
 {
     return(await Task.Run(() => {
         return Context.SecurityMgr.OnUnauthorized(HttpContext, Context)
         ?? HttpHandlerResult.Unauthorized();
     }, token));
 }
예제 #2
0
 /// <summary>
 /// Creates a response that returns a File.
 /// </summary>
 public HttpHandlerResult File(string filename)
 {
     return(HttpHandlerResult.File(handler.Context, filename));
 }
예제 #3
0
 /// <summary>
 /// Creates an empty HTTP '500 Internal Server Error' response.
 /// </summary>
 public HttpHandlerResult Exception(Exception error)
 {
     return(HttpHandlerResult.Exception(error));
 }
예제 #4
0
 /// <summary>
 /// Creates a response that returns an HTML view.
 /// </summary>
 public HttpHandlerResult View(string name, object param = null)
 {
     return(HttpHandlerResult.View(handler.Context, name, param));
 }
예제 #5
0
 /// <summary>
 /// Creates a response that redirects to the specified relative path.
 /// </summary>
 public HttpHandlerResult Redirect(string path, object queryArgs = null)
 {
     return(HttpHandlerResult.Redirect(handler.Context, path, queryArgs));
 }
예제 #6
0
 /// <summary>
 /// Creates a response that redirects to the specified absolute URL.
 /// </summary>
 public HttpHandlerResult RedirectUrl(string url)
 {
     return(HttpHandlerResult.RedirectUrl(url));
 }
예제 #7
0
 /// <summary>
 /// Creates an empty HTTP '400 Bad Request' response.
 /// </summary>
 public HttpHandlerResult BadRequest()
 {
     return(HttpHandlerResult.BadRequest());
 }
예제 #8
0
 /// <summary>
 /// Creates an empty HTTP '404 Not Found' response.
 /// </summary>
 public HttpHandlerResult NotFound()
 {
     return(HttpHandlerResult.NotFound());
 }
예제 #9
0
 /// <summary>
 /// Creates an empty HTTP response with the
 /// specified <paramref name="statusCode"/>.
 /// </summary>
 public HttpHandlerResult Status(HttpStatusCode statusCode)
 {
     return(HttpHandlerResult.Status(statusCode));
 }
예제 #10
0
 /// <summary>
 /// Creates an empty HTTP '200 OK' response.
 /// </summary>
 public HttpHandlerResult Ok()
 {
     return(HttpHandlerResult.Ok());
 }
예제 #11
0
 public HttpHandlerResult RunAfter(IHttpHandler httpHandler, HttpHandlerResult result)
 {
     return(Run(httpHandler, HttpFilterEvents.After));
 }