implemented permissive
This commit is contained in:
parent
fc4d078e1e
commit
0ab597b430
1 changed files with 7 additions and 2 deletions
9
http.go
9
http.go
|
|
@ -36,8 +36,13 @@ func toHttpHandler(h http.Handler, parseToken oidc.ParseTokenFunc, setters ...op
|
|||
|
||||
tokenString, err := oidc.GetTokenString(r.Header.Get, opts.TokenString)
|
||||
if err != nil {
|
||||
onError(w, opts.ErrorHandler, http.StatusBadRequest, options.GetTokenErrorDescription, err)
|
||||
return
|
||||
if !opts.Permissive {
|
||||
onError(w, opts.ErrorHandler, http.StatusBadRequest, options.GetTokenErrorDescription, err)
|
||||
return
|
||||
} else {
|
||||
h.ServeHTTP(w, r)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
token, err := parseToken(ctx, tokenString)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue