From a494dc7e0b97482529933e1f2e2ef0615d405393 Mon Sep 17 00:00:00 2001 From: Dmitriy Novash Date: Tue, 15 Dec 2020 17:30:05 +0200 Subject: [PATCH] With trailing newline base64 generate wrong hash --- CLI,-Automatization-and-Cronjobs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLI,-Automatization-and-Cronjobs.md b/CLI,-Automatization-and-Cronjobs.md index f153c83..7fb001f 100644 --- a/CLI,-Automatization-and-Cronjobs.md +++ b/CLI,-Automatization-and-Cronjobs.md @@ -8,7 +8,7 @@ At the moment there is no complete API specification available, so you have to r ## 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: ```bash -$ echo -e "username:password" | base64 +$ echo -en "username:password" | base64 dXNlcm5hbWU6cGFzc3dvcmQ= $ curl -H "X-IFM-Auth: dXNlcm5hbWU6cGFzc3dvcmQ=" ... ``` \ No newline at end of file