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

Allow connection with AuthSession cookie #5

Merged

Conversation

adrienverge
Copy link
Contributor

Hey @bmario 👋, thanks for the good job! That's the only async CouchDB lib I've found, that works with modern Python.


Upon first connection with username and password, CouchDB servers
install an AuthSession cookie in the browser.

This commits allows connecting using this cookie, e.g.:

CouchDB("http://localhost:5984", cookie="ZGVtb0B0b2x0ZWNrLmNvbT...")

Upon first connection with `username` and `password`, CouchDB servers
install an `AuthSession` cookie in the browser.

This commits allows connecting using this cookie, e.g.:

    CouchDB("http://localhost:5984", cookie="ZGVtb0B0b2x0ZWNrLmNvbT...")
@bmario
Copy link
Member

bmario commented Mar 13, 2020

These changes correlate to this, don't they?

Back in the days, I also used cookies for authentification, but removed it in the end because I had troubles with long-running sessions. Moving this issue to the user though sounds like a middle ground for now. For the future, I'd like to have conviencen functions, so the user can get the cookie using aiocouch itself.

@bmario bmario merged commit f613c1f into metricq:master Mar 13, 2020
@adrienverge adrienverge deleted the feat/connect-with-authsession-cookie branch March 13, 2020 13:30
@adrienverge
Copy link
Contributor Author

These changes correlate to this, don't they?

exactly

Back in the days, I also used cookies for authentification, but removed it in the end because I had troubles with long-running sessions. Moving this issue to the user though sounds like a middle ground for now.

Sure. But sometimes the caller code doesn't know username and password, for example if it only handles cookies passed by the client.

For the future, I'd like to have conviencen functions, so the user can get the cookie using aiocouch itself.

That would be nice indeed.

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

2 participants