fix json response
This commit is contained in:
parent
d2d3395c25
commit
38a1f315de
3 changed files with 9 additions and 13 deletions
|
@ -37,8 +37,7 @@ func Userinfo(w http.ResponseWriter, r *http.Request, userinfoProvider UserinfoP
|
|||
info := oidc.NewUserInfo()
|
||||
err = userinfoProvider.Storage().SetUserinfoFromToken(r.Context(), info, tokenID, subject, r.Header.Get("origin"))
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusForbidden)
|
||||
utils.MarshalJSON(w, err)
|
||||
utils.MarshalJSONWithStatus(w, err, http.StatusForbidden)
|
||||
return
|
||||
}
|
||||
utils.MarshalJSON(w, info)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue