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

[Issue Report] Error when either username/password is used but its counterpart is missing #425

Open
Antosser opened this issue Feb 29, 2024 · 3 comments · May be fixed by #426
Open

[Issue Report] Error when either username/password is used but its counterpart is missing #425

Antosser opened this issue Feb 29, 2024 · 3 comments · May be fixed by #426
Assignees

Comments

@Antosser
Copy link
Contributor

Right now, --username and --password are separate arguments that don't work without each other. Why not combine them into a single password? You can only have one username, so what's the point of even having them? If anyone wants, they can use a colon to separate the username and password. Also, no error is thrown if you only pass in one of them, which is confusing and actually tripped me up for a second a couple of months ago

@EstebanBorai
Copy link
Member

EstebanBorai commented Mar 1, 2024

This design is on purpose.

You can use NodeJS Http Server as example: https://www.npmjs.com/package/http-server.

In basic authentication, you use two inputs to build credentials for simplicity and at the same time flexibilty.

Any assumptions makes by app designer/developer would reflect on limitations.

@Antosser
Copy link
Contributor Author

Antosser commented Mar 1, 2024

Alright! Haven't really looked into the standards. What do you think about throwing an error if only one of them is passed in?

@EstebanBorai
Copy link
Member

Alright! Haven't really looked into the standards. What do you think about throwing an error if only one of them is passed in?

No worries! I agree with that! That validation is actually missing!

@EstebanBorai EstebanBorai changed the title [Issue Report] username and password are separate arguments [Issue Report] Error when either username/password is used but its counterpart is missing Mar 2, 2024
@Antosser Antosser linked a pull request Mar 2, 2024 that will close this issue
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 a pull request may close this issue.

2 participants