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 get_username_and_password API #350

Closed
zooba opened this issue Oct 27, 2018 · 2 comments
Closed

Add get_username_and_password API #350

zooba opened this issue Oct 27, 2018 · 2 comments

Comments

@zooba
Copy link
Contributor

zooba commented Oct 27, 2018

There are some scenarios where it is possible (and preferred) to retrieve the username for a service from just the system, but currently keyring has no ability to return a username that has not been provided by the caller.

I propose to add a new API matching get_password's signature, but named get_username_and_password ad returning (username, password), where username might match the provided username. The ABC can include a default implementation of this that uses get_password and returns the provided username.

@zooba
Copy link
Contributor Author

zooba commented Oct 27, 2018

I intend to work on this today at the PyPA sprints.

@zooba
Copy link
Contributor Author

zooba commented Oct 27, 2018

Thinking about set_username_and_password, there doesn't seem to be any value in supporting this. It's really only useful for "read-only" keyring backends, since setting a password implies setting the username too.

zooba added a commit to zooba/keyring that referenced this issue Oct 27, 2018
Adds a new API to enable backends to return a username along with the password.
The entry points include fallback behavior for backends that do not implement the API.
zooba added a commit to zooba/keyring that referenced this issue Oct 27, 2018
Adds a new API to enable backends to return a username along with the password.
The entry points include fallback behavior for backends that do not implement the API.
jaraco added a commit that referenced this issue Oct 27, 2018
Fixes #350 Add get_username_and_password API
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

No branches or pull requests

1 participant