-
-
Notifications
You must be signed in to change notification settings - Fork 478
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
Allow passing custom headers to metadata request in authorize_redirect #710
base: main
Are you sure you want to change the base?
Allow passing custom headers to metadata request in authorize_redirect #710
Conversation
Hello. Thank you for your contribution. Would you consider adding some unit tests? |
Hello. Unfortunately I don't have any experience in unit testing. Having said that, I am willing to give it a try. Perhaps you could suggest a file from the tests of the project, to serve as an example for me? |
if self.client_kwargs is None: | ||
self.client_kwargs = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed as client_kwargs
is automatically initialized as an empty dict when a None
value is passed?
self.client_kwargs = client_kwargs or {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct, thanks for pointing it out. I also cleaned the other changes a bit.
58f6776
to
eaf1e5a
Compare
I appreciate the guidance. I'll get on with adding the tests. |
This pull request implements a feature to allow custom HTTP headers to be passed to the metadata request made by
authorize_redirect()
.Previously (#633), when calling
authorize_redirect(redirect_uri, headers=headers)
, the custom headers were not forwarded to the GET request for server metadata, causing a 401 Unauthorized error when the endpoint was protected by a security gateway.What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)