Skip to content

Instantly share code, notes, and snippets.

View thecodeite's full-sized avatar

Sam Plews thecodeite

  • Codeite Ltd
  • Cheltenham, UK
View GitHub Profile
public class BasicAuth : IHttpModule
{
protected bool IsHeaderPresent
{
get
{
var context = HttpContext.Current;
var authHeader = context.Request.Headers["Authorization"];
return (!string.IsNullOrEmpty(authHeader));
}