commit | 2016fd615f617478ca9142fe6a3a04859019a0e6 | [log] [tgz] |
---|---|---|
author | tooooolong <yu.chaong@icloud.com> | Thu Dec 24 18:29:02 2015 +0800 |
committer | tooooolong <yu.chaong@icloud.com> | Thu Dec 24 18:29:02 2015 +0800 |
tree | 5ea21cf155aae4c6d781331c486eee028285ef2f | |
parent | 6c0a3422b26b2d5173c498bffa84bb83587e72f3 [diff] |
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 }