fix: use ParseFromRequest instead of ParseFromRequestWithClaims (#771)

ParseFromRequestWithClaims is DEPRECATED
This commit is contained in:
dom3k 2019-06-06 13:22:04 +02:00 committed by Henrique Dias
parent 425ec275e9
commit ffd8a3a637

View File

@ -54,7 +54,7 @@ func withUser(fn handleFunc) handleFunc {
} }
var tk authToken var tk authToken
token, err := request.ParseFromRequestWithClaims(r, &extractor{}, &tk, keyFunc) token, err := request.ParseFromRequest(r, &extractor{}, keyFunc, request.WithClaims(&tk))
if err != nil || !token.Valid { if err != nil || !token.Valid {
return http.StatusForbidden, nil return http.StatusForbidden, nil