rts2003-so 1.4.3 → 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/index.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,12 +19,12 @@ $ npm install --save rts2003-so
|
|
|
19
19
|
const { SingleSignOn, RTS2003_SO_ENDPOINT, RTS2003_SO_CLIENT_KEY, RTS2003_SO_SECRET_KEY } = require('rts2003-so');
|
|
20
20
|
|
|
21
21
|
process.env.RTS2003_SO_ENDPOINT = 'custom-endpoint';
|
|
22
|
-
process.env.
|
|
22
|
+
process.env.RTS2003_SO_CLIENT_ID = 'custom-client-id';
|
|
23
23
|
process.env.RTS2003_SO_SECRET_KEY = 'custom-secret-key';
|
|
24
24
|
|
|
25
25
|
// show env
|
|
26
26
|
console.log('ENDPOINT Key:', RTS2003_SO_ENDPOINT);
|
|
27
|
-
console.log('
|
|
27
|
+
console.log('CLIENT_ID Key:', RTS2003_SO_CLIENT_ID);
|
|
28
28
|
console.log('SECRET_KEY Key:', RTS2003_SO_SECRET_KEY);
|
|
29
29
|
|
|
30
30
|
// use new class
|
package/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const fetch = (...args) => import('node-fetch').then(({default: fetch}) => fetch(...args));
|
|
2
2
|
|
|
3
3
|
const RTS2003_SO_ENDPOINT = process.env.RTS2003_SO_ENDPOINT || '';
|
|
4
|
-
const
|
|
4
|
+
const RTS2003_SO_CLIENT_ID = process.env.RTS2003_SO_CLIENT_ID || '';
|
|
5
5
|
const RTS2003_SO_SECRET_KEY = process.env.RTS2003_SO_SECRET_KEY || '';
|
|
6
6
|
|
|
7
7
|
class SingleSignOn {
|
|
8
|
-
constructor(endpoint = RTS2003_SO_ENDPOINT, clientId =
|
|
8
|
+
constructor(endpoint = RTS2003_SO_ENDPOINT, clientId = RTS2003_SO_CLIENT_ID, secretKey = RTS2003_SO_SECRET_KEY) {
|
|
9
9
|
this.endpoint = endpoint;
|
|
10
10
|
this.clientId = clientId;
|
|
11
11
|
this.secretKey = secretKey;
|
|
@@ -269,7 +269,7 @@ class SingleSignOn {
|
|
|
269
269
|
|
|
270
270
|
module.exports = {
|
|
271
271
|
RTS2003_SO_ENDPOINT,
|
|
272
|
-
|
|
272
|
+
RTS2003_SO_CLIENT_ID,
|
|
273
273
|
RTS2003_SO_SECRET_KEY,
|
|
274
274
|
SingleSignOn
|
|
275
275
|
};
|
package/package.json
CHANGED