From b2d27d2ca062442614f48949b1cc5839b50494ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=9F=E9=85=8C=20=E9=B5=AC=E5=85=84?= Date: Tue, 17 Jan 2023 02:46:17 +0800 Subject: [PATCH] Added comments --- signin.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/signin.js b/signin.js index a4a30e2..c2013fd 100644 --- a/signin.js +++ b/signin.js @@ -32,6 +32,26 @@ class SignInEventArgs class Signin extends EventEmitter { + /** Conf structure + * { + * "spec": process.env.OPENID_SPEC_URI + * , "authorization_endpoint_params": { + * "client_id": process.env.AZURE_AD_CLIENT_ID + * , "redirect_url": `https://${HOST_NAME}/user/login/` + * , "nonce": "{RANDSTR}" + * , "state": "{RANDSTR}" + * , "scope": "openid profile email" + * , "response_mode": "form_post" + * , "response_type": "id_token" + * } + * , "end_session_endpoint_params": { + * "post_logout_redirect_uri": `https://${HOST_NAME}/user/logout/` + * } + * + * NOTE: + * set Signin().RANDSTR = () => SecureRandStr(); to enable custom templated functions + * * Only support "^{FUNCTION_NAME}$" for now + **/ constructor( conf ) { super();