-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Return the auth challenge in the WWW-Authenticate when auth fails #1387
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
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.patchAfter 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? |
01b0137 to
4330bf7
Compare
c216cdf to
b458f0f
Compare
908d84f to
0678e7a
Compare
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-Authenticateheader on the response.httpContext.Responsethat is available inAuthenticationMiddleware.csis recreated/overwritten further down the pipeline, so we need to preserve the generatedWWW-Authenticateheader somewhere. For now, I've put it in thehttpContext.Items(suggestions on how to do this in a better way are highly appreciated).WWW-Authenticateheader on the response inResponderMiddleware.cs.