Merge pull request #3 from tooooolong/patch-1 fromHeader should return strings behind "BEARER"
diff --git a/jws/jws.go b/jws/jws.go index 3716d38..d0b1a54 100644 --- a/jws/jws.go +++ b/jws/jws.go
@@ -407,7 +407,7 @@ func fromHeader(req *http.Request) ([]byte, bool) { if ah := req.Header.Get("Authorization"); ah != "" && len(ah) > 6 && strings.EqualFold(ah[0:6], "BEARER") { - return []byte(ah[:7]), true + return []byte(ah[7:]), true } return nil, false }