public static void SendAuthorizationRequired(HttpContext context, AuthorizationRequiredException exception) { if (context == null) { throw new ArgumentNullException("context"); } if (exception == null) { throw new ArgumentNullException("exception"); } context.Response.Write(@"{ ""authrequired"": """ + JsonEscape(exception.AuthorizationUri.AbsoluteUri) + @""" }"); context.Response.End(); }
public static void SendAuthorizationRequired(HttpContext context, AuthorizationRequiredException exception) { if (context == null) throw new ArgumentNullException("context"); if (exception == null) throw new ArgumentNullException("exception"); context.Response.Write(@"{ ""authrequired"": """ + JsonEscape(exception.AuthorizationUri.AbsoluteUri) + @""" }"); context.Response.End(); }