-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return the auth challenge in the WWW-Authenticate when auth fails #1387
base: develop
Are you sure you want to change the base?
Return the auth challenge in the WWW-Authenticate when auth fails #1387
Conversation
Same problem for Access-Control-Allow-Origin ?? |
Hi Kees! Could you Sync fork please? So, your develop branch is outdated! |
40f5d8e
to
0e5ab4e
Compare
The feature branch has been rebased onto ThreeMammals:develop! @KeesV Could you Sync fork please? The develop branch will be updated by top commits! |
hey @raman-m! Thanks for revitalizing this PR. It's great to see some activity here. |
a5b94fd
to
9564e2c
Compare
CircleCI status: pull/1387 git diff commit1..commit2 > ../pull-1387.patch After that for new fork, and new feature branch (base is develop) you need just to apply the patch: git apply ../pull-1387.patch
|
Hello @KeesV ! |
e99b633
to
34eb955
Compare
Could you sync fork once again please? |
Fixes / New Feature
Perform Challenge on failed authentication, and return the generated WWW-Authenticate header in the upstream response.
Proposed Changes
AuthenticationMiddleware.cs
: perform a challenge whenever authentication fails. This generates aWWW-Authenticate
header on the response.httpContext.Response
that is available inAuthenticationMiddleware.cs
is recreated/overwritten further down the pipeline, so we need to preserve the generatedWWW-Authenticate
header somewhere. For now, I've put it in thehttpContext.Items
(suggestions on how to do this in a better way are highly appreciated).WWW-Authenticate
header on the response inResponderMiddleware.cs
.