fix: if claim is empty and ExpiredAllowed on, abort early and pass through
This commit is contained in:
parent
7df6bb245b
commit
52a1f18c60
|
@ -176,6 +176,11 @@ func AuthMiddleware(options AuthMiddlewareOptions) func(http.Handler) http.Handl
|
|||
}
|
||||
}
|
||||
|
||||
if claim == nil && options.ExpiredAllowed {
|
||||
next.ServeHTTP(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
userId, err := strconv.ParseUint(claim.Subject, 10, 64)
|
||||
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue