Skip to content

Instantly share code, notes, and snippets.

View jasich's full-sized avatar

Jason Sich jasich

View GitHub Profile
@jasich
jasich / gist:a1ea2f6a3d195fc57f01
Created July 22, 2014 19:35
Golang BasicAuth Middleware
package security
import (
"encoding/base64"
"net/http"
"strings"
)
// BasicAuth Middleware with next handler in chain
type BasicAuth struct {