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

Use serveral URLCredentials for different protection spaces #3407

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Looking4Cache
Copy link

Goals ⚽

I have some calls that are protected by more than one authentication challenge. At my example I have a client certificate and a http basic auth. The goal is to add the possibility to add several URLCredential objects depending on the authenticationMethod of the protectionSpace.

Implementation Details 🚧

I added the dictionary credentialsByAuthenticationMethod to the mutableState of a Request. This can hold a URLCredential for each authenticationMethod. In Session.credential I look first if a specific URLCredential is available in credentialsByAuthenticationMethod. If not, I fallback to the existing behaviour.

Testing Details 🔍

None.

@EmadBeyrami
Copy link

👍🏼

@jshier
Copy link
Contributor

jshier commented Mar 8, 2021

Thanks for the PR! Sorry for the delay but this will need testing before it can be merged, which may require some updates to our test server, Firewalk. Can you outline the use cases this supports? What combinations of credentials have you used in the past?

@Looking4Cache
Copy link
Author

For me the need was that my server uses a client certificate to authorise the user. The server tunnels https requests and if there is a basic auth on the tunnelled page, it was not possible to add these two (client certificate and basic auth) URLCredential to the request.

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.

None yet

3 participants