Closed kpedro88 closed 8 months ago
I'm conflicted on this one. If we add --user
to sasl-xoauth2-tool
then we should probably also add flags for all the other fields that can be present in a token file. That, like your second suggestion, feels like overkill. That having been said I think I'd be more comfortable with an --overwrite_existing_token
flag that implements the second option.
I noticed when obtaining a new token that the extra fields I had previously specified in the token file weren't preserved (i.e.
user
that I added in #74). I can think of two ways to fix this:--user
flag tosasl-xoauth2-tool
output_file
argument insasl-xoauth2-tool
already exists, load it into a dict, and thenupdate()
the dict with the new token dict before writing back to the output file. (This is more general, but maybe overkill.)Let me know which one is preferred and I'll send a PR.