From 2d830043c722fd852859d8e57c97d89f20a29bcd Mon Sep 17 00:00:00 2001 From: John Zhao Date: Fri, 26 Feb 2016 11:30:04 -0800 Subject: [PATCH] KYLIN-1454 Add how to use python to generate authorization data for rest api --- website/_docs/howto/howto_use_restapi.md | 4 ++++ website/_docs2/howto/howto_use_restapi.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/website/_docs/howto/howto_use_restapi.md b/website/_docs/howto/howto_use_restapi.md index a49a2db..75fddf9 100644 --- a/website/_docs/howto/howto_use_restapi.md +++ b/website/_docs/howto/howto_use_restapi.md @@ -40,6 +40,10 @@ This page lists all the Rest APIs provided by Kylin; The base of the URL is `/ky #### Request Header Authorization data encoded by basic auth is needed in the header, such as: Authorization:Basic {data} +You can generate {data} by using below python script +``` +python -c "import base64; print base64.standard_b64encode('$UserName:$Password')" +``` #### Response Body * userDetails - Defined authorities and status of current user. diff --git a/website/_docs2/howto/howto_use_restapi.md b/website/_docs2/howto/howto_use_restapi.md index 3adaf66..83cf3fe 100644 --- a/website/_docs2/howto/howto_use_restapi.md +++ b/website/_docs2/howto/howto_use_restapi.md @@ -40,6 +40,10 @@ This page lists all the Rest APIs provided by Kylin; The base of the URL is `/ky #### Request Header Authorization data encoded by basic auth is needed in the header, such as: Authorization:Basic {data} +You can generate {data} by using below python script +``` +python -c "import base64; print base64.standard_b64encode('$UserName:$Password')" +``` #### Response Body * userDetails - Defined authorities and status of current user. -- 2.5.4 (Apple Git-61)