8000 refactor: session.clearAuthCache nws13n by nornagon · Pull Request #17970 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

refactor: session.clearAuthCache nws13n #17970

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

Merged
merged 1 commit into from
May 3, 2019
Merged

Conversation

nornagon
Copy link
Contributor
@nornagon nornagon commented Apr 25, 2019

Description of Change

Refactor session.clearAuthCache to use the network service. This results in losing the ability to filter what is cleared; we should deprecate this in 6-0-x.

BREAKING CHANGE

Checklist

Release Notes

Notes: session.clearAuthCache no longer allows filtering the cleared cache entries.

@nornagon nornagon requested a review from deepak1556 April 25, 2019 19:58
@electron-cation electron-cation bot added new-pr 🌱 PR opened recently and removed new-pr 🌱 PR opened recently labels Apr 25, 2019
@nornagon
Copy link
Contributor Author
nornagon commented May 1, 2019

Do not merge yet, I want to understand if it's actually OK to remove these APIs. (& land the deprecation first.)

@nornagon
Copy link
Contributor Author
nornagon commented May 3, 2019

Landing this because we're going to have to figure out some way of moving this function to the network service before 7-0-x lands, so if we need to do more to support pre-existing use cases, we can build on top of this change :)

@nornagon nornagon removed the wip ⚒ label May 3, 2019
@nornagon nornagon merged commit cb13d7a into master May 3, 2019
@release-clerk
Copy link
release-clerk bot commented May 3, 2019

Release Notes Persisted

session.clearAuthCache no longer allows filtering the cleared cache entries.

@nornagon nornagon deleted the nws13n-clear-auth-cache branch May 3, 2019 21:30
codebytere pushed a commit that referenced this pull request May 7, 2019
The network service APIs do not support the fine-grained clearing of the auth cache. In preparation for switching to the network service in 7.x, log a warning that the options argument is deprecated. Ref #17970.

This might not be quite right as we could also potentially expose the new options that are available: namely, start and end time. #17970 does not expose those options, but it would in theory be possible to support them with the existing network service APIs. The current options object does not offer time-based cache clearing.
kiku-jw pushed a commit to kiku-jw/electron that referenced this pull request May 16, 2019
@HeikoH
Copy link
HeikoH commented Jul 25, 2020

@nornagon - is there are a 'new' way to clear the cache for a specific origin after this API change? i.e. we're still one 5.x and using something like session.clearAuthCache({ type: 'clientCertificate', origin: url }), which doesn't work anymore. And the new behavior where entire auth cache is cleared doesn't really work for us.

@nornagon
Copy link
Contributor Author

@HeikoH Sadly, the underlying API does not support filtering by origin.

Can you say more about your use case?

@HeikoH
Copy link
HeikoH commented Jul 28, 2020

We're connecting to various back-ends that need to be authenticated with using PKI certificates, potentially multiple/different ones. Currently we also allow users to un-authenticate with individual endpoints, which currently uses session.clearAuthCache({ type: 'clientCertificate', origin: url }). By changing this to the argument-less session.clearAuthCache the entire auth cache is cleared.

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
0