Embedding username and password into URL for basic authentication is as follows and
I understand.
http://username:[email protected]
For example, if your username and password contain spaces or symbols, you can encode them as a percentage. I embedded it in the URL, but I can't log in.
Example
username —AAA bbb01
password:DddEeeee11!
http://AAA%20bb%2001:DddEee11%[email protected]
Is the URL wrong?
html http
There should be no problem encoding the URL as a percentage.
It is the role of the client (browser) to extract login information from the URL and set it in the Authorization
header.You should check the log to see if your client interprets the URL correctly.If interpreted correctly, the request should be as follows:
GET/HTTP/1.1
...
Authorization: Basic Zm9vIGJhcjpiYXp6IQ==
© 2024 OneMinuteCode. All rights reserved.