Skip to content
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

Add support for extracting authentication params from www-authenticate header #237

Merged
merged 2 commits into from
Mar 18, 2025

Conversation

romaindup
Copy link
Contributor

When receiving a request with Authorization: Bearer, return an http 401 error with a header containing the necessary information to authenticate (WWW-Authenticate: Bearer, authorization_uri="https://...", client_id="...").
This allows client like Excel to authenticate using organization credentials.

See documentation here and here.

Added a unit test in test_single_tenant.py to cover this scenario.

Implementation of #232

@davidhuser
Copy link
Contributor

LGTM, although I would prefer also to assert for the header value in other tests as well (i.e. when there is no authorization_url).

@romaindup
Copy link
Contributor Author

Thanks for reviewing. Fair ask for the other tests. I've added a header validation for the 401 responses.

@davidhuser
Copy link
Contributor

LGTM 👍

@romaindup
Copy link
Contributor Author

Anything more required before this can be merged?

@JonasKs
Copy link
Member

JonasKs commented Mar 14, 2025

No, I'll get to it this weekend ☺️

@JonasKs
Copy link
Member

JonasKs commented Mar 18, 2025

Thank you so much!!

@JonasKs JonasKs merged commit b179cb3 into intility:main Mar 18, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants