Closed commonism closed 1 year ago
As I see this allows API auth as well - maybe it's better to have this as general auth_cb which gets the login data passed for easy manipulation?
def authenticate(data: Dict[str, str]):
…
return data
client = Client(server, email, password, auth_cb=authenticate)
Thanks for the contribution !
I am not sure to understand well what you mean. If it's a spelling suggestion, yes i would argue that auth_cb
(both in argument and attribute) is a better alternative.
Would you mind then updating this PR as i'm more than willing to merge it !
Had some spare characters, made it authentication_cb. No docs to add this to?
I was going to do it myself after merge, but you can of course do it yourself by adding an exemple to https://github.com/corpusops/bitwardentools/blob/main/USAGE.md (like copy/pasting/adapting what you already posted in commit message)
And also add changelog entry in https://github.com/corpusops/bitwardentools/blob/main/CHANGES.md
So i'm waiting for it, or tell me to do it myself !
just go ahead - you know how it is meant to look like
feel free to https://gist.github.com/wtbarnes/56b942641d314522094d312bbaf33a81
This allows supplying 2fa tokens to the login.
e.g. using pyotp