summaryrefslogtreecommitdiff
path: root/cmd/ponzu/vendor/github.com/nilslice/jwt/doc.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/ponzu/vendor/github.com/nilslice/jwt/doc.go')
-rw-r--r--cmd/ponzu/vendor/github.com/nilslice/jwt/doc.go40
1 files changed, 0 insertions, 40 deletions
diff --git a/cmd/ponzu/vendor/github.com/nilslice/jwt/doc.go b/cmd/ponzu/vendor/github.com/nilslice/jwt/doc.go
deleted file mode 100644
index aa9a5c8..0000000
--- a/cmd/ponzu/vendor/github.com/nilslice/jwt/doc.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// Package jwt provides methods to create and check JSON Web Tokens (JWT). It only implements HMAC 256 encryption and has a very small footprint, ideal for simple usage when authorizing clients
-/*
-
- package main
-
- import (
- auth "github.com/nilslice/jwt"
- "fmt"
- "net/http"
- "strings"
- "time"
- )
-
- func main() {
- http.HandleFunc("/auth/new", func(res http.ResponseWriter, req *http.Request) {
- claims := map[string]interface{}{"exp": time.Now().Add(time.Hour * 24).Unix()}
- token, err := auth.New(claims)
- if err != nil {
- http.Error(res, "Error", 500)
- return
- }
- res.Header().Add("Authorization", "Bearer "+token)
-
- res.WriteHeader(http.StatusOK)
- })
-
- http.HandleFunc("/auth", func(res http.ResponseWriter, req *http.Request) {
- userToken := strings.Split(req.Header.Get("Authorization"), " ")[1]
-
- if auth.Passes(userToken) {
- fmt.Println("ok")
- } else {
- fmt.Println("no")
- }
- })
-
- http.ListenAndServe(":8080", nil)
- }
-*/
-package jwt