summaryrefslogtreecommitdiff
path: root/server/auth.go
diff options
context:
space:
mode:
authorBen Burwell <ben@benburwell.com>2019-09-20 16:46:10 -0400
committerBen Burwell <ben@benburwell.com>2019-09-20 16:46:10 -0400
commite1f8ea2a889494859a61a9259110e40c70002d55 (patch)
tree52a96d1e80840512cac11449b549ceada1f24ef1 /server/auth.go
parente1eee80afa1ddf579aea52435c69813459ce3811 (diff)
Simplify examples
Diffstat (limited to 'server/auth.go')
-rw-r--r--server/auth.go15
1 files changed, 0 insertions, 15 deletions
diff --git a/server/auth.go b/server/auth.go
deleted file mode 100644
index 15ea164..0000000
--- a/server/auth.go
+++ /dev/null
@@ -1,15 +0,0 @@
-package main
-
-import (
- "net/http"
-)
-
-// An Authenticator takes an HTTP request and returns true iff it is allowed to
-// use our service.
-type Authenticator func(req *http.Request) bool
-
-func TokenAuthenticator() Authenticator {
- return func(req *http.Request) bool {
- return req.Header.Get("authorization") == "magic"
- }
-}