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

deprecate password_prompt kwarg to OP() #119

Open
zcutlip opened this issue May 20, 2023 · 0 comments
Open

deprecate password_prompt kwarg to OP() #119

zcutlip opened this issue May 20, 2023 · 0 comments
Assignees
Labels
deprecation work to be done to deprecate & remove some part of the API refactor refactoring work that isn't an enhancement

Comments

@zcutlip
Copy link
Owner

zcutlip commented May 20, 2023

We need to deprecate and plan to remove the password_prompt kwarg for the OP() constructor.

Originally the purpose of this kwarg was:

  • if the caller didn't provide a password
  • and they didn't have a valid OP_SESSION_<token> set from previously authenticating,
  • should we allow the op command to prompt for authentication on the console, or just fail hard?

Now that authentications paths have gotten more complex (bio/no bio, service accounts, etc), and we have the existing_auth= kwarg, allowing the caller to specify "use if available", "ignore", or "required", the password_prompt preference doesn't make any sense.

We should do the following:

  • refactor _new_or_existing_signin() and _do_normal_signin() where it gets used to rely exclusively on existing_auth
  • deprecate the kwarg in OP()
  • if the password_prompt is passed in as True, either adjust existing_auth or possibly raise an exception if the values conflict
@zcutlip zcutlip self-assigned this May 20, 2023
@zcutlip zcutlip added deprecation work to be done to deprecate & remove some part of the API refactor refactoring work that isn't an enhancement labels May 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation work to be done to deprecate & remove some part of the API refactor refactoring work that isn't an enhancement
Projects
None yet
Development

No branches or pull requests

1 participant