kauth-sdk-node 0.1.24
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/CHANGELOG.md +280 -0
- package/README.md +58 -0
- package/dist/authenticator/authenticator.d.ts +29 -0
- package/dist/authenticator/authenticator.js +90 -0
- package/dist/authenticator/base.d.ts +16 -0
- package/dist/authenticator/base.js +6 -0
- package/dist/authenticator/google.d.ts +21 -0
- package/dist/authenticator/google.js +12 -0
- package/dist/authenticator/index.d.ts +3 -0
- package/dist/authenticator/index.js +11 -0
- package/dist/authenticator/manager.d.ts +38 -0
- package/dist/authenticator/manager.js +165 -0
- package/dist/authenticator/miniprogram.d.ts +15 -0
- package/dist/authenticator/miniprogram.js +12 -0
- package/dist/authenticator/mozi.d.ts +21 -0
- package/dist/authenticator/mozi.js +12 -0
- package/dist/authenticator/provider.d.ts +28 -0
- package/dist/authenticator/provider.js +76 -0
- package/dist/authorizer/index.d.ts +1 -0
- package/dist/authorizer/index.js +4 -0
- package/dist/authorizer/permission.d.ts +9 -0
- package/dist/authorizer/permission.js +53 -0
- package/dist/common/config/config.d.ts +37 -0
- package/dist/common/config/config.js +2 -0
- package/dist/common/constant/http.d.ts +42 -0
- package/dist/common/constant/http.js +47 -0
- package/dist/common/http/kauth.d.ts +50 -0
- package/dist/common/http/kauth.js +177 -0
- package/dist/common/http/kflow.d.ts +12 -0
- package/dist/common/http/kflow.js +36 -0
- package/dist/common/http/request/kauth.d.ts +89 -0
- package/dist/common/http/request/kauth.js +2 -0
- package/dist/common/http/request/kflow.d.ts +16 -0
- package/dist/common/http/request/kflow.js +2 -0
- package/dist/common/http/response/kauth.d.ts +86 -0
- package/dist/common/http/response/kauth.js +8 -0
- package/dist/common/http/response/kflow.d.ts +33 -0
- package/dist/common/http/response/kflow.js +2 -0
- package/dist/common/http/tool/marmot.d.ts +48 -0
- package/dist/common/http/tool/marmot.js +97 -0
- package/dist/common/util/converter/permission.d.ts +12 -0
- package/dist/common/util/converter/permission.js +36 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +29 -0
- package/package.json +84 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var kauth_1 = require("./common/http/kauth");
|
|
4
|
+
Object.defineProperty(exports, "KauthApi", { enumerable: true, get: function () { return kauth_1.KauthApi; } });
|
|
5
|
+
var kflow_1 = require("./common/http/kflow");
|
|
6
|
+
Object.defineProperty(exports, "KflowApi", { enumerable: true, get: function () { return kflow_1.KflowApi; } });
|
|
7
|
+
var authenticator_1 = require("./authenticator");
|
|
8
|
+
Object.defineProperty(exports, "GoogleAuthenticator", { enumerable: true, get: function () { return authenticator_1.GoogleAuthenticator; } });
|
|
9
|
+
Object.defineProperty(exports, "MoziAuthenticator", { enumerable: true, get: function () { return authenticator_1.MoziAuthenticator; } });
|
|
10
|
+
Object.defineProperty(exports, "MiniprogramAuthenticator", { enumerable: true, get: function () { return authenticator_1.MiniprogramAuthenticator; } });
|
|
11
|
+
Object.defineProperty(exports, "PrimaryPrincipal", { enumerable: true, get: function () { return authenticator_1.PrimaryPrincipal; } });
|
|
12
|
+
Object.defineProperty(exports, "JsonWebTokenSubjectProvider", { enumerable: true, get: function () { return authenticator_1.JsonWebTokenSubjectProvider; } });
|
|
13
|
+
Object.defineProperty(exports, "JsonWebTokenAuthenticationProvider", { enumerable: true, get: function () { return authenticator_1.JsonWebTokenAuthenticationProvider; } });
|
|
14
|
+
var authorizer_1 = require("./authorizer");
|
|
15
|
+
Object.defineProperty(exports, "PermissionCore", { enumerable: true, get: function () { return authorizer_1.PermissionCore; } });
|
|
16
|
+
var mozi_1 = require("./authenticator/mozi");
|
|
17
|
+
Object.defineProperty(exports, "MoziAuthenticationInformation", { enumerable: true, get: function () { return mozi_1.MoziAuthenticationInformation; } });
|
|
18
|
+
Object.defineProperty(exports, "MoziPrincipal", { enumerable: true, get: function () { return mozi_1.MoziPrincipal; } });
|
|
19
|
+
Object.defineProperty(exports, "MoziCredential", { enumerable: true, get: function () { return mozi_1.MoziCredential; } });
|
|
20
|
+
var google_1 = require("./authenticator/google");
|
|
21
|
+
Object.defineProperty(exports, "GoogleAuthenticationInformation", { enumerable: true, get: function () { return google_1.GoogleAuthenticationInformation; } });
|
|
22
|
+
Object.defineProperty(exports, "GooglePrincipal", { enumerable: true, get: function () { return google_1.GooglePrincipal; } });
|
|
23
|
+
Object.defineProperty(exports, "GoogleCredential", { enumerable: true, get: function () { return google_1.GoogleCredential; } });
|
|
24
|
+
var miniprogram_1 = require("./authenticator/miniprogram");
|
|
25
|
+
Object.defineProperty(exports, "MiniprogramAuthenticationInformation", { enumerable: true, get: function () { return miniprogram_1.MiniprogramAuthenticationInformation; } });
|
|
26
|
+
Object.defineProperty(exports, "MiniprogramPrincipal", { enumerable: true, get: function () { return miniprogram_1.MiniprogramPrincipal; } });
|
|
27
|
+
Object.defineProperty(exports, "MiniprogramCredential", { enumerable: true, get: function () { return miniprogram_1.MiniprogramCredential; } });
|
|
28
|
+
var permission_1 = require("./common/util/converter/permission");
|
|
29
|
+
Object.defineProperty(exports, "PermissionConverter", { enumerable: true, get: function () { return permission_1.PermissionConverter; } });
|
package/package.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "kauth-sdk-node",
|
|
3
|
+
"version": "0.1.24",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"types": "dist",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"clean": "rm -rf dist coverage",
|
|
12
|
+
"build": "npm run clean && tsc",
|
|
13
|
+
"watch": "tsc -w",
|
|
14
|
+
"type-check": "tsc --noEmit",
|
|
15
|
+
"lint": "npm run type-check && eslint . --fix --ext .ts",
|
|
16
|
+
"test": "mocha --recursive --require ts-node/register 'test/**/*.ts'",
|
|
17
|
+
"coverage": "nyc -t coverage npm run test",
|
|
18
|
+
"ci": "npm run lint && npm run coverage",
|
|
19
|
+
"version": "conventional-changelog -p angular -i CHANGELOG.md -s && git add .",
|
|
20
|
+
"prepublishOnly": "rm -rf dist && npm run build"
|
|
21
|
+
},
|
|
22
|
+
"author": "",
|
|
23
|
+
"license": "ISC",
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "https://gitlab-ag.marmot-cloud.com/marmot/kauth-sdk-node.git"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"axios": "^0.19.2",
|
|
30
|
+
"camelcase-keys": "^6.2.2",
|
|
31
|
+
"dayjs": "^1.8.29",
|
|
32
|
+
"jsonwebtoken": "^8.5.1",
|
|
33
|
+
"lru-cache": "^6.0.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/jsonwebtoken": "^8.5.0",
|
|
37
|
+
"@types/lru-cache": "^5.1.0",
|
|
38
|
+
"@types/mocha": "^8.0.0",
|
|
39
|
+
"@types/sinon": "^9.0.4",
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "^3.7.1",
|
|
41
|
+
"@typescript-eslint/parser": "^3.7.1",
|
|
42
|
+
"conventional-changelog-cli": "^2.1.0",
|
|
43
|
+
"egg": "^2.27.0",
|
|
44
|
+
"eslint": "^7.5.0",
|
|
45
|
+
"eslint-config-prettier": "^7.1.0",
|
|
46
|
+
"eslint-plugin-prettier": "^3.3.1",
|
|
47
|
+
"lint-staged": "^10.5.3",
|
|
48
|
+
"mocha": "^8.0.1",
|
|
49
|
+
"nyc": "^15.1.0",
|
|
50
|
+
"prettier": "^2.2.1",
|
|
51
|
+
"sinon": "^9.0.2",
|
|
52
|
+
"ts-node": "^8.10.2",
|
|
53
|
+
"typescript": "^3.9.6"
|
|
54
|
+
},
|
|
55
|
+
"nyc": {
|
|
56
|
+
"include": [
|
|
57
|
+
"src/**/*.ts"
|
|
58
|
+
],
|
|
59
|
+
"extension": [
|
|
60
|
+
".ts"
|
|
61
|
+
],
|
|
62
|
+
"require": [
|
|
63
|
+
"ts-node/register"
|
|
64
|
+
],
|
|
65
|
+
"reporter": [
|
|
66
|
+
"lcov",
|
|
67
|
+
"text",
|
|
68
|
+
"text-summary"
|
|
69
|
+
],
|
|
70
|
+
"sourceMap": true,
|
|
71
|
+
"instrument": true
|
|
72
|
+
},
|
|
73
|
+
"husky": {
|
|
74
|
+
"hooks": {
|
|
75
|
+
"pre-commit": "lint-staged"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"lint-staged": {
|
|
79
|
+
"*.ts": [
|
|
80
|
+
"prettier --write",
|
|
81
|
+
"eslint --fix"
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
}
|