mirror of https://github.com/golang-jwt/jwt.git
some bad documentation
This commit is contained in:
parent
97424f0088
commit
2827deb72f
3
jwt.go
3
jwt.go
|
@ -17,6 +17,9 @@ type Token struct {
|
||||||
Valid bool
|
Valid bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Parse, validate, and return a token.
|
||||||
|
// keyFunc will receive the parsed token and should return the key for validating.
|
||||||
|
// If everything is kosher, err will be nil
|
||||||
func Parse(tokenString string, keyFunc func(*Token)([]byte, error)) (token *Token, err error) {
|
func Parse(tokenString string, keyFunc func(*Token)([]byte, error)) (token *Token, err error) {
|
||||||
parts := strings.Split(tokenString, ".")
|
parts := strings.Split(tokenString, ".")
|
||||||
if len(parts) == 3 {
|
if len(parts) == 3 {
|
||||||
|
|
Loading…
Reference in New Issue