mirror of
https://github.com/misterunknown/ifm.git
synced 2025-08-17 13:30:38 +02:00
With trailing newline base64 generate wrong hash
@@ -8,7 +8,7 @@ At the moment there is no complete API specification available, so you have to r
|
|||||||
## autorization
|
## autorization
|
||||||
If you want to use the API with curl and want to use authentication, you can do this by passing the `X-IFM-AUTH` header. This header is constructed like the widely known basic authorization header. Just join username and password with a colon and do a base64 encode:
|
If you want to use the API with curl and want to use authentication, you can do this by passing the `X-IFM-AUTH` header. This header is constructed like the widely known basic authorization header. Just join username and password with a colon and do a base64 encode:
|
||||||
```bash
|
```bash
|
||||||
$ echo -e "username:password" | base64
|
$ echo -en "username:password" | base64
|
||||||
dXNlcm5hbWU6cGFzc3dvcmQ=
|
dXNlcm5hbWU6cGFzc3dvcmQ=
|
||||||
$ curl -H "X-IFM-Auth: dXNlcm5hbWU6cGFzc3dvcmQ=" ...
|
$ curl -H "X-IFM-Auth: dXNlcm5hbWU6cGFzc3dvcmQ=" ...
|
||||||
```
|
```
|
Reference in New Issue
Block a user