From 4990d5b7ea2d95842e6a46d5efadac1b169ce45c Mon Sep 17 00:00:00 2001 From: dacongda Date: Sun, 18 Aug 2024 20:50:00 +0800 Subject: [PATCH] docs: Add docs for the new feature of accessKey and secretKey --- docs/user/api-key.md | 21 +++++++++++++++++++++ sidebars.js | 1 + static/img/user/user_api_key.png | Bin 0 -> 10781 bytes 3 files changed, 22 insertions(+) create mode 100644 docs/user/api-key.md create mode 100644 static/img/user/user_api_key.png diff --git a/docs/user/api-key.md b/docs/user/api-key.md new file mode 100644 index 000000000..a71e4e7bc --- /dev/null +++ b/docs/user/api-key.md @@ -0,0 +1,21 @@ +--- +title: Api Key +description: Access api with api key +keywords: [user, api key, accessKey, accessSecret] +authors: [DacongDA] +--- + +## Access api with api key + +You can access casdoor api with accessKey and accessSecret of user. + +1. Create a pair of accessKey and accessSecret in account setting page. +2. Put accessKey and accessSercet in into the http query param. + +## Example + +![User Api Key](/img/user/user_api_key.png) + +```bash +curl --location 'http://door.casdoor.com/api/user?accessKey=b86db9dc-6bd7-4997-935c-af480dd2c796&accessSecret=79911517-fc36-4093-b115-65a9741f6b14' +``` diff --git a/sidebars.js b/sidebars.js index a4a19971a..5d28a39d2 100644 --- a/sidebars.js +++ b/sidebars.js @@ -332,6 +332,7 @@ module.exports = { "user/multi-factor-authentication", "user/roles", "user/permissions", + "user/api-key", ], }, { diff --git a/static/img/user/user_api_key.png b/static/img/user/user_api_key.png new file mode 100644 index 0000000000000000000000000000000000000000..65e44922003d830e9c4ec8d91cff0fd7f2792dc7 GIT binary patch literal 10781 zcmb`NcT`i~+UKJ*>Hb7Oy3z$g2?zoL(tDHMk&aXe9Rer_(m|T^q996dp%VciK&2n+y_b^iI> zfx8vk002*`mF1*$ea(00ES%{L(C3F0Cdh8@+on2-(FP-e&^r-SBP*jJA1({G@XjdS zdB8P!1^y!6u>byskGaI4XA3Vr%22zf564X5PCqt3}wB z{s6~cGXVe#P!yA3wt-1ppFg-(&l%L@JE~0DKM4y8{5ck{!lg z_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