-
Notifications
You must be signed in to change notification settings - Fork 382
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
Client-side HTTP basic authentication support #2450
Comments
@thehowl I will create a PR to address this issue and look forward to your guidance to complete this |
Thanks! |
it seems you're recommending to use bcrypt to encrypt the password, where can we store the
|
@linhpn99 No I'm not. That's an example of how basic auth can be implemented at the server level, using caddy (which requires the password to be stored as safe hashes); it's provided as a reference for testing. This is not a server change, only a client change. It can be as simple as calling this with the values provided in the remote URL. |
HTTP basic authentication is a simple authentication mechanism, implemented directly in the protocol. Because it is integrated at a protocol level, web services can be protected by edge web servers like nginx and caddy, without requiring changes in the application itself.
For instance, I could have a simple caddy set up of a gno.land node, password-protecting its RPC, as follows:
However, this is not supported client-side, for instance in gnokey. The URL-spec compliant syntax for providing basic authentication is prefixing the domain with
user:password@
, as follows:It would be nice if our clients, like
gnokey
andgnoclient
, supported basic authentication and automatically added theAuthorization
header in HTTP requests when provided.The text was updated successfully, but these errors were encountered: