From 39819b744c95da60d83e713d985b72639bf86c61 Mon Sep 17 00:00:00 2001 From: Wentao Lyu <35-wentao.lyu@users.noreply.git.stereye.tech> Date: Sat, 18 Mar 2023 22:47:11 +0800 Subject: [PATCH] doc: add magic of generate auth code --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 54d2c4830..fe322ce81 100644 --- a/README.md +++ b/README.md @@ -262,7 +262,13 @@ The sample structure is simple. It provide three basic endpoint: The only one thing that drive user system work is `req.session.user`. Once it's set, the client will be trusted. Set to `null` if logout. -Please refer to `/api/server/routes/authYoutLogin.js` file. It's very clear and simple to tell you how to implement your user system. +Please refer to `/api/server/routes/authYourLogin.js` file. It's very clear and simple to tell you how to implement your user system. + +Or you can ask chatGPT to write the code for you, here is one example to connect LDAP: + +``` +Please write me an express module, that serve the login and logout endpoint as a router. The login and logout uri is '/' and '/logout'. Once loginned, save display name and username in session.user, as {display, username}. Then redirect to '/'. Please write the code using express and other lib, and storage any server configuration in a config variable. I want the user to be connected to my LDAP server. +```