You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
user-api: fix Auth<T> request guards not forwarding
Sometimes, we have authenticated and unauthenticated variants of the
same endpoint, with the implicit assumption that if a request had no
authentication information (e.g. headers, cookies, whatevs), then rocket
would pick the unauthenticated one. However, this only worked if the
FromRequest impl for Auth<T> actually forwarded instead of returning an
Unauthorized error on missing authentication information (as rocket will
abort request processing when Outcome::Error is returned). Yet, this was
not the case.
While we are at it, forward with the correct status code (unauthorized
instead of not found)
Closes#270
Signed-off-by: stadust <43299462+stadust@users.noreply.github.com>
0 commit comments