samlesa 2.15.6 → 2.15.7
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/build/.idea/build.iml +12 -0
- package/build/.idea/deployment.xml +14 -0
- package/build/.idea/modules.xml +8 -0
- package/build/src/binding-post.js +0 -4
- package/package.json +80 -80
- package/types/api.d.ts +15 -0
- package/types/api.d.ts.map +1 -0
- package/types/binding-post.d.ts +48 -0
- package/types/binding-post.d.ts.map +1 -0
- package/types/binding-redirect.d.ts +54 -0
- package/types/binding-redirect.d.ts.map +1 -0
- package/types/binding-simplesign.d.ts +41 -0
- package/types/binding-simplesign.d.ts.map +1 -0
- package/types/entity-idp.d.ts +38 -0
- package/types/entity-idp.d.ts.map +1 -0
- package/types/entity-sp.d.ts +38 -0
- package/types/entity-sp.d.ts.map +1 -0
- package/types/entity.d.ts +100 -0
- package/types/entity.d.ts.map +1 -0
- package/types/extractor.d.ts +26 -0
- package/types/extractor.d.ts.map +1 -0
- package/types/flow.d.ts +7 -0
- package/types/flow.d.ts.map +1 -0
- package/types/libsaml.d.ts +208 -0
- package/types/libsaml.d.ts.map +1 -0
- package/types/metadata-idp.d.ts +25 -0
- package/types/metadata-idp.d.ts.map +1 -0
- package/types/metadata-sp.d.ts +37 -0
- package/types/metadata-sp.d.ts.map +1 -0
- package/types/metadata.d.ts +58 -0
- package/types/metadata.d.ts.map +1 -0
- package/types/src/binding-post.d.ts.map +1 -1
- package/types/types.d.ts +128 -0
- package/types/types.d.ts.map +1 -0
- package/types/urn.d.ts +195 -0
- package/types/urn.d.ts.map +1 -0
- package/types/utility.d.ts +133 -0
- package/types/utility.d.ts.map +1 -0
- package/types/validator.d.ts +4 -0
- package/types/validator.d.ts.map +1 -0
- package/build/index.js.map +0 -1
- package/build/src/api.js.map +0 -1
- package/build/src/binding-post.js.map +0 -1
- package/build/src/binding-redirect.js.map +0 -1
- package/build/src/binding-simplesign.js.map +0 -1
- package/build/src/entity-idp.js.map +0 -1
- package/build/src/entity-sp.js.map +0 -1
- package/build/src/entity.js.map +0 -1
- package/build/src/extractor.js.map +0 -1
- package/build/src/flow.js.map +0 -1
- package/build/src/libsaml.js.map +0 -1
- package/build/src/metadata-idp.js.map +0 -1
- package/build/src/metadata-sp.js.map +0 -1
- package/build/src/metadata.js.map +0 -1
- package/build/src/types.js.map +0 -1
- package/build/src/urn.js.map +0 -1
- package/build/src/utility.js.map +0 -1
- package/build/src/validator.js.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="WEB_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager">
|
|
4
|
+
<content url="file://$MODULE_DIR$">
|
|
5
|
+
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
6
|
+
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
7
|
+
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
8
|
+
</content>
|
|
9
|
+
<orderEntry type="inheritedJdk" />
|
|
10
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
11
|
+
</component>
|
|
12
|
+
</module>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="PublishConfigData" remoteFilesAllowedToDisappearOnAutoupload="false">
|
|
4
|
+
<serverData>
|
|
5
|
+
<paths name="阿里云">
|
|
6
|
+
<serverdata>
|
|
7
|
+
<mappings>
|
|
8
|
+
<mapping local="$PROJECT_DIR$" web="/" />
|
|
9
|
+
</mappings>
|
|
10
|
+
</serverdata>
|
|
11
|
+
</paths>
|
|
12
|
+
</serverData>
|
|
13
|
+
</component>
|
|
14
|
+
</project>
|
|
@@ -95,8 +95,6 @@ async function base64LoginResponse(requestInfo = {}, entity, user = {}, customTa
|
|
|
95
95
|
oneMinutesLaterTime.setMinutes(oneMinutesLaterTime.getMinutes() + 5);
|
|
96
96
|
const OneMinutesLater = oneMinutesLaterTime.toISOString();
|
|
97
97
|
const now = nowTime.toISOString();
|
|
98
|
-
console.log(`现在是北京时间:${nowTime.toLocaleString()}`);
|
|
99
|
-
console.log(`现在是两分钟时间:${oneMinutesLaterTime.toLocaleString()}`);
|
|
100
98
|
const acl = metadata.sp.getAssertionConsumerService(binding.post);
|
|
101
99
|
const sessionIndex = 'session' + idpSetting.generateID(); // 这个是当前系统的会话索引,用于单点注销
|
|
102
100
|
const tenHoursLaterTime = new Date(nowTime.getTime());
|
|
@@ -195,8 +193,6 @@ async function base64LoginResponse(requestInfo = {}, entity, user = {}, customTa
|
|
|
195
193
|
},
|
|
196
194
|
});
|
|
197
195
|
}
|
|
198
|
-
console.log(rawSamlResponse);
|
|
199
|
-
console.log('看一下---------------------------');
|
|
200
196
|
return Promise.resolve({
|
|
201
197
|
id,
|
|
202
198
|
context: utility.base64Encode(rawSamlResponse),
|
package/package.json
CHANGED
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "samlesa",
|
|
3
|
-
"version": "2.15.
|
|
4
|
-
"description": "High-level API for Single Sign On (SAML 2.0) baseed on samlify ",
|
|
5
|
-
"main": "build/index.js",
|
|
6
|
-
"keywords": [
|
|
7
|
-
"nodejs",
|
|
8
|
-
"saml2",
|
|
9
|
-
"sso",
|
|
10
|
-
"slo",
|
|
11
|
-
"metadata"
|
|
12
|
-
],
|
|
13
|
-
"type": "module",
|
|
14
|
-
"typings": "types/index.d.ts",
|
|
15
|
-
"scripts": {
|
|
16
|
-
"build": "tsc && copyfiles -u 1 src/schema/**/* build/src",
|
|
17
|
-
"docs": "docsify serve -o docs",
|
|
18
|
-
"lint": "tslint -p .",
|
|
19
|
-
"lint:fix": "tslint -p . --fix",
|
|
20
|
-
"pretest": "make pretest",
|
|
21
|
-
"test": "NODE_ENV=test nyc ava",
|
|
22
|
-
"coverage": "nyc report --reporter=text-lcov | coveralls",
|
|
23
|
-
"hooks:postinstall": "ln -sf $PWD/.pre-commit.sh $PWD/.git/hooks/pre-commit"
|
|
24
|
-
},
|
|
25
|
-
"exports": {
|
|
26
|
-
".": {
|
|
27
|
-
"types": "./types/index.d.ts",
|
|
28
|
-
"import": "./build/index.js"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"files": [
|
|
32
|
-
"build",
|
|
33
|
-
"types"
|
|
34
|
-
],
|
|
35
|
-
"contributors": [
|
|
36
|
-
"Veclea <vemocle@gmail.com>"
|
|
37
|
-
],
|
|
38
|
-
"author": "Veclea",
|
|
39
|
-
"repository": {
|
|
40
|
-
"url": "https://github.com/Veclea/samlify.git",
|
|
41
|
-
"type": "git"
|
|
42
|
-
},
|
|
43
|
-
"license": "MIT",
|
|
44
|
-
"dependencies": {
|
|
45
|
-
"@xmldom/xmldom": "^0.8.6",
|
|
46
|
-
"camelcase": "^8.0.0",
|
|
47
|
-
"pako": "^2.1.0",
|
|
48
|
-
"uuid": "^11.1.0",
|
|
49
|
-
"xml": "^1.0.1",
|
|
50
|
-
"xml-crypto": "^6.1.2",
|
|
51
|
-
"xml-encryption": "^3.1.0",
|
|
52
|
-
"xml-escape": "^1.1.0",
|
|
53
|
-
"xmllint-wasm": "^4.0.2",
|
|
54
|
-
"xpath": "^0.0.32"
|
|
55
|
-
},
|
|
56
|
-
"devDependencies": {
|
|
57
|
-
"@microsoft/api-extractor": "7.52.8",
|
|
58
|
-
"@types/node": "^22.15.17",
|
|
59
|
-
"@types/pako": "2.0.3",
|
|
60
|
-
"@types/uuid": "10.0.0",
|
|
61
|
-
"ava": "^4.1.0",
|
|
62
|
-
"copyfiles": "^2.4.1",
|
|
63
|
-
"coveralls": "^3.1.1",
|
|
64
|
-
"esbuild": "^0.25.4",
|
|
65
|
-
"nyc": "^17.1.0",
|
|
66
|
-
"timekeeper": "^2.2.0",
|
|
67
|
-
"typescript": "5.8.3"
|
|
68
|
-
},
|
|
69
|
-
"ava": {
|
|
70
|
-
"extensions": [
|
|
71
|
-
"ts"
|
|
72
|
-
],
|
|
73
|
-
"require": [
|
|
74
|
-
"ts-node/register"
|
|
75
|
-
],
|
|
76
|
-
"files": [
|
|
77
|
-
"!**/*.d.ts"
|
|
78
|
-
]
|
|
79
|
-
}
|
|
80
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "samlesa",
|
|
3
|
+
"version": "2.15.7",
|
|
4
|
+
"description": "High-level API for Single Sign On (SAML 2.0) baseed on samlify ",
|
|
5
|
+
"main": "build/index.js",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"nodejs",
|
|
8
|
+
"saml2",
|
|
9
|
+
"sso",
|
|
10
|
+
"slo",
|
|
11
|
+
"metadata"
|
|
12
|
+
],
|
|
13
|
+
"type": "module",
|
|
14
|
+
"typings": "types/index.d.ts",
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc && copyfiles -u 1 src/schema/**/* build/src",
|
|
17
|
+
"docs": "docsify serve -o docs",
|
|
18
|
+
"lint": "tslint -p .",
|
|
19
|
+
"lint:fix": "tslint -p . --fix",
|
|
20
|
+
"pretest": "make pretest",
|
|
21
|
+
"test": "NODE_ENV=test nyc ava",
|
|
22
|
+
"coverage": "nyc report --reporter=text-lcov | coveralls",
|
|
23
|
+
"hooks:postinstall": "ln -sf $PWD/.pre-commit.sh $PWD/.git/hooks/pre-commit"
|
|
24
|
+
},
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./types/index.d.ts",
|
|
28
|
+
"import": "./build/index.js"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"build",
|
|
33
|
+
"types"
|
|
34
|
+
],
|
|
35
|
+
"contributors": [
|
|
36
|
+
"Veclea <vemocle@gmail.com>"
|
|
37
|
+
],
|
|
38
|
+
"author": "Veclea",
|
|
39
|
+
"repository": {
|
|
40
|
+
"url": "https://github.com/Veclea/samlify.git",
|
|
41
|
+
"type": "git"
|
|
42
|
+
},
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@xmldom/xmldom": "^0.8.6",
|
|
46
|
+
"camelcase": "^8.0.0",
|
|
47
|
+
"pako": "^2.1.0",
|
|
48
|
+
"uuid": "^11.1.0",
|
|
49
|
+
"xml": "^1.0.1",
|
|
50
|
+
"xml-crypto": "^6.1.2",
|
|
51
|
+
"xml-encryption": "^3.1.0",
|
|
52
|
+
"xml-escape": "^1.1.0",
|
|
53
|
+
"xmllint-wasm": "^4.0.2",
|
|
54
|
+
"xpath": "^0.0.32"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@microsoft/api-extractor": "7.52.8",
|
|
58
|
+
"@types/node": "^22.15.17",
|
|
59
|
+
"@types/pako": "2.0.3",
|
|
60
|
+
"@types/uuid": "10.0.0",
|
|
61
|
+
"ava": "^4.1.0",
|
|
62
|
+
"copyfiles": "^2.4.1",
|
|
63
|
+
"coveralls": "^3.1.1",
|
|
64
|
+
"esbuild": "^0.25.4",
|
|
65
|
+
"nyc": "^17.1.0",
|
|
66
|
+
"timekeeper": "^2.2.0",
|
|
67
|
+
"typescript": "5.8.3"
|
|
68
|
+
},
|
|
69
|
+
"ava": {
|
|
70
|
+
"extensions": [
|
|
71
|
+
"ts"
|
|
72
|
+
],
|
|
73
|
+
"require": [
|
|
74
|
+
"ts-node/register"
|
|
75
|
+
],
|
|
76
|
+
"files": [
|
|
77
|
+
"!**/*.d.ts"
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
}
|
package/types/api.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DOMParser as dom } from '@xmldom/xmldom';
|
|
2
|
+
import type { Options as DOMParserOptions } from '@xmldom/xmldom';
|
|
3
|
+
interface Context extends ValidatorContext, DOMParserContext {
|
|
4
|
+
}
|
|
5
|
+
interface ValidatorContext {
|
|
6
|
+
validate?: (xml: string) => Promise<any>;
|
|
7
|
+
}
|
|
8
|
+
interface DOMParserContext {
|
|
9
|
+
dom: dom;
|
|
10
|
+
}
|
|
11
|
+
export declare function getContext(): Context;
|
|
12
|
+
export declare function setSchemaValidator(params: ValidatorContext): void;
|
|
13
|
+
export declare function setDOMParserOptions(options?: DOMParserOptions): void;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElE,UAAU,OAAQ,SAAQ,gBAAgB,EAAE,gBAAgB;CAAG;AAE/D,UAAU,gBAAgB;IACxB,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;CAC1C;AAED,UAAU,gBAAgB;IACxB,GAAG,EAAE,GAAG,CAAC;CACV;AAOD,wBAAgB,UAAU,IAAG,OAAO,CAEnC;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,gBAAgB,GAAE,IAAI,CAShE;AAED,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,gBAAqB,GAAE,IAAI,CAEvE"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file binding-post.ts
|
|
3
|
+
* @author tngan
|
|
4
|
+
* @desc Binding-level API, declare the functions using POST binding
|
|
5
|
+
*/
|
|
6
|
+
import type { BindingContext } from './entity.js';
|
|
7
|
+
/**
|
|
8
|
+
* @desc Generate a base64 encoded login request
|
|
9
|
+
* @param {string} referenceTagXPath reference uri
|
|
10
|
+
* @param {object} entity object includes both idp and sp
|
|
11
|
+
* @param {function} customTagReplacement used when developers have their own login response template
|
|
12
|
+
*/
|
|
13
|
+
declare function base64LoginRequest(referenceTagXPath: string, entity: any, customTagReplacement?: (template: string) => BindingContext): BindingContext;
|
|
14
|
+
/**
|
|
15
|
+
* @desc Generate a base64 encoded login response
|
|
16
|
+
* @param {object} requestInfo corresponding request, used to obtain the id
|
|
17
|
+
* @param {object} entity object includes both idp and sp
|
|
18
|
+
* @param {object} user current logged user (e.g. req.user)
|
|
19
|
+
* @param {function} customTagReplacement used when developers have their own login response template
|
|
20
|
+
* @param {boolean} encryptThenSign whether or not to encrypt then sign first (if signing). Defaults to sign-then-encrypt
|
|
21
|
+
* @param AttributeStatement
|
|
22
|
+
*/
|
|
23
|
+
declare function base64LoginResponse(requestInfo: any | undefined, entity: any, user?: any, customTagReplacement?: (template: string) => BindingContext, encryptThenSign?: boolean, AttributeStatement?: never[]): Promise<BindingContext>;
|
|
24
|
+
/**
|
|
25
|
+
* @desc Generate a base64 encoded logout request
|
|
26
|
+
* @param {object} user current logged user (e.g. req.user)
|
|
27
|
+
* @param {string} referenceTagXPath reference uri
|
|
28
|
+
* @param {object} entity object includes both idp and sp
|
|
29
|
+
* @param {function} customTagReplacement used when developers have their own login response template
|
|
30
|
+
* @return {string} base64 encoded request
|
|
31
|
+
*/
|
|
32
|
+
declare function base64LogoutRequest(user: Record<string, unknown>, referenceTagXPath: string, entity: any, customTagReplacement?: (template: string) => BindingContext): BindingContext;
|
|
33
|
+
/**
|
|
34
|
+
* @desc Generate a base64 encoded logout response
|
|
35
|
+
* @param {object} requestInfo corresponding request, used to obtain the id
|
|
36
|
+
* @param {string} referenceTagXPath reference uri
|
|
37
|
+
* @param {object} entity object includes both idp and sp
|
|
38
|
+
* @param {function} customTagReplacement used when developers have their own login response template
|
|
39
|
+
*/
|
|
40
|
+
declare function base64LogoutResponse(requestInfo: any, entity: any, customTagReplacement: (template: string) => BindingContext): BindingContext;
|
|
41
|
+
declare const postBinding: {
|
|
42
|
+
base64LoginRequest: typeof base64LoginRequest;
|
|
43
|
+
base64LoginResponse: typeof base64LoginResponse;
|
|
44
|
+
base64LogoutRequest: typeof base64LogoutRequest;
|
|
45
|
+
base64LogoutResponse: typeof base64LogoutResponse;
|
|
46
|
+
};
|
|
47
|
+
export default postBinding;
|
|
48
|
+
//# sourceMappingURL=binding-post.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binding-post.d.ts","sourceRoot":"","sources":["../src/binding-post.ts"],"names":[],"mappings":"AAAA;;;;EAIE;AAGF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAMlD;;;;;EAKE;AACF,iBAAS,kBAAkB,CAAC,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,GAAG,cAAc,CAqD/I;AACD;;;;;;;;GAQG;AACH,iBAAe,mBAAmB,CAAC,WAAW,EAAE,GAAG,YAAK,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,GAAE,GAAQ,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,EAAE,eAAe,GAAE,OAAe,EAAG,kBAAkB,UAAG,GAAG,OAAO,CAAC,cAAc,CAAC,CAuIrO;AACD;;;;;;;EAOE;AACF,iBAAS,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,EAAC,MAAM,EAAE,MAAM,KAAA,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,GAAG,cAAc,CAkDzK;AACD;;;;;;EAME;AACF,iBAAS,oBAAoB,CAAC,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,GAAG,cAAc,CAsDvI;AAED,QAAA,MAAM,WAAW;;;;;CAKhB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { BindingContext } from './entity.js';
|
|
2
|
+
import { IdentityProvider as Idp } from './entity-idp.js';
|
|
3
|
+
import { ServiceProvider as Sp } from './entity-sp.js';
|
|
4
|
+
export interface BuildRedirectConfig {
|
|
5
|
+
baseUrl: string;
|
|
6
|
+
type: string;
|
|
7
|
+
isSigned: boolean;
|
|
8
|
+
context: string;
|
|
9
|
+
entitySetting: any;
|
|
10
|
+
relayState?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @desc Redirect URL for login request
|
|
14
|
+
* @param {object} entity object includes both idp and sp
|
|
15
|
+
* @param {function} customTagReplacement used when developers have their own login response template
|
|
16
|
+
* @return {string} redirect URL
|
|
17
|
+
*/
|
|
18
|
+
declare function loginRequestRedirectURL(entity: {
|
|
19
|
+
idp: Idp;
|
|
20
|
+
sp: Sp;
|
|
21
|
+
}, customTagReplacement?: (template: string) => BindingContext): BindingContext;
|
|
22
|
+
/**
|
|
23
|
+
* @desc Redirect URL for login response
|
|
24
|
+
* @param {object} requestInfo corresponding request, used to obtain the id
|
|
25
|
+
* @param {object} entity object includes both idp and sp
|
|
26
|
+
* @param {object} user current logged user (e.g. req.user)
|
|
27
|
+
* @param {String} relayState the relaystate sent by sp corresponding request
|
|
28
|
+
* @param {function} customTagReplacement used when developers have their own login response template
|
|
29
|
+
* @param AttributeStatement
|
|
30
|
+
*/
|
|
31
|
+
declare function loginResponseRedirectURL(requestInfo: any, entity: any, user?: any, relayState?: string, customTagReplacement?: (template: string) => BindingContext, AttributeStatement?: never[]): BindingContext;
|
|
32
|
+
/**
|
|
33
|
+
* @desc Redirect URL for logout request
|
|
34
|
+
* @param {object} user current logged user (e.g. req.user)
|
|
35
|
+
* @param {object} entity object includes both idp and sp
|
|
36
|
+
* @param {function} customTagReplacement used when developers have their own login response template
|
|
37
|
+
* @return {string} redirect URL
|
|
38
|
+
*/
|
|
39
|
+
declare function logoutRequestRedirectURL(user: any, entity: any, relayState?: string, customTagReplacement?: (template: string, tags: object) => BindingContext): BindingContext;
|
|
40
|
+
/**
|
|
41
|
+
* @desc Redirect URL for logout response
|
|
42
|
+
* @param {object} requescorresponding request, used to obtain the id
|
|
43
|
+
* @param {object} entity object includes both idp and sp
|
|
44
|
+
* @param {function} customTagReplacement used when developers have their own login response template
|
|
45
|
+
*/
|
|
46
|
+
declare function logoutResponseRedirectURL(requestInfo: any, entity: any, relayState?: string, customTagReplacement?: (template: string) => BindingContext): BindingContext;
|
|
47
|
+
declare const redirectBinding: {
|
|
48
|
+
loginRequestRedirectURL: typeof loginRequestRedirectURL;
|
|
49
|
+
loginResponseRedirectURL: typeof loginResponseRedirectURL;
|
|
50
|
+
logoutRequestRedirectURL: typeof logoutRequestRedirectURL;
|
|
51
|
+
logoutResponseRedirectURL: typeof logoutResponseRedirectURL;
|
|
52
|
+
};
|
|
53
|
+
export default redirectBinding;
|
|
54
|
+
//# sourceMappingURL=binding-redirect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binding-redirect.d.ts","sourceRoot":"","sources":["../src/binding-redirect.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC;AAChD,OAAO,EAAC,gBAAgB,IAAI,GAAG,EAAC,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAC,eAAe,IAAI,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAOrD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,GAAG,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAgED;;;;;GAKG;AACH,iBAAS,uBAAuB,CAAC,MAAM,EAAE;IACvC,GAAG,EAAE,GAAG,CAAC;IACT,EAAE,EAAE,EAAE,CAAA;CACP,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,GAAG,cAAc,CAyC9E;AAED;;;;;;;;GAQG;AACH,iBAAS,wBAAwB,CAAC,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,GAAE,GAAQ,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,EAAC,kBAAkB,UAAI,GAAG,cAAc,CAoGxM;AAED;;;;;;GAMG;AACH,iBAAS,wBAAwB,CAAC,IAAI,KAAA,EAAE,MAAM,KAAA,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,cAAc,GAAG,cAAc,CAwC9J;AAED;;;;;GAKG;AACH,iBAAS,yBAAyB,CAAC,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,GAAG,cAAc,CAyClK;AAED,QAAA,MAAM,eAAe;;;;;CAKpB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file binding-simplesign.ts
|
|
3
|
+
* @author Orange
|
|
4
|
+
* @desc Binding-level API, declare the functions using POST SimpleSign binding
|
|
5
|
+
*/
|
|
6
|
+
import type { BindingContext, SimpleSignComputedContext } from './entity.js';
|
|
7
|
+
export interface BuildSimpleSignConfig {
|
|
8
|
+
type: string;
|
|
9
|
+
context: string;
|
|
10
|
+
entitySetting: any;
|
|
11
|
+
relayState?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface BindingSimpleSignContext {
|
|
14
|
+
id: string;
|
|
15
|
+
context: string;
|
|
16
|
+
signature: any;
|
|
17
|
+
sigAlg: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @desc Generate a base64 encoded login request
|
|
21
|
+
* @param {string} referenceTagXPath reference uri
|
|
22
|
+
* @param {object} entity object includes both idp and sp
|
|
23
|
+
* @param {function} customTagReplacement used when developers have their own login response template
|
|
24
|
+
*/
|
|
25
|
+
declare function base64LoginRequest(entity: any, customTagReplacement?: (template: string) => BindingContext): SimpleSignComputedContext;
|
|
26
|
+
/**
|
|
27
|
+
* @desc Generate a base64 encoded login response
|
|
28
|
+
* @param {object} requestInfo corresponding request, used to obtain the id
|
|
29
|
+
* @param {object} entity object includes both idp and sp
|
|
30
|
+
* @param {object} user current logged user (e.g. req.user)
|
|
31
|
+
* @param {string} relayState the relay state
|
|
32
|
+
* @param {function} customTagReplacement used when developers have their own login response template
|
|
33
|
+
* @param AttributeStatement
|
|
34
|
+
*/
|
|
35
|
+
declare function base64LoginResponse(requestInfo: any | undefined, entity: any, user?: any, relayState?: string, customTagReplacement?: (template: string) => BindingContext, AttributeStatement?: []): Promise<BindingSimpleSignContext>;
|
|
36
|
+
declare const simpleSignBinding: {
|
|
37
|
+
base64LoginRequest: typeof base64LoginRequest;
|
|
38
|
+
base64LoginResponse: typeof base64LoginResponse;
|
|
39
|
+
};
|
|
40
|
+
export default simpleSignBinding;
|
|
41
|
+
//# sourceMappingURL=binding-simplesign.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binding-simplesign.d.ts","sourceRoot":"","sources":["../src/binding-simplesign.ts"],"names":[],"mappings":"AAAA;;;;EAIE;AAGF,OAAQ,KAAK,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAO9E,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,GAAG,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AA6CD;;;;;EAKE;AACF,iBAAS,kBAAkB,CAAC,MAAM,EAAE,GAAG,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,GAAG,yBAAyB,CAkD/H;AACD;;;;;;;;GAQG;AACH,iBAAe,mBAAmB,CAAC,WAAW,EAAE,GAAG,YAAK,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,GAAE,GAAQ,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,EAAE,kBAAkB,GAAC,EAAO,GAAG,OAAO,CAAC,wBAAwB,CAAC,CA6FtO;AAED,QAAA,MAAM,iBAAiB;;;CAGpB,CAAC;AAEJ,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import Entity, { type ESamlHttpRequest } from './entity.js';
|
|
2
|
+
import { ServiceProviderConstructor as ServiceProvider, IdentityProviderMetadata, type IdentityProviderSettings } from './types.js';
|
|
3
|
+
import { type FlowResult } from './flow.js';
|
|
4
|
+
import type { BindingContext } from './entity.js';
|
|
5
|
+
/**
|
|
6
|
+
* Identity provider can be configured using either metadata importing or idpSetting
|
|
7
|
+
*/
|
|
8
|
+
export default function (props: IdentityProviderSettings): IdentityProvider;
|
|
9
|
+
/**
|
|
10
|
+
* Identity provider can be configured using either metadata importing or idpSetting
|
|
11
|
+
*/
|
|
12
|
+
export declare class IdentityProvider extends Entity {
|
|
13
|
+
entityMeta: IdentityProviderMetadata;
|
|
14
|
+
constructor(idpSetting: IdentityProviderSettings);
|
|
15
|
+
/**
|
|
16
|
+
* @desc Generates the login response for developers to design their own method
|
|
17
|
+
* @param params
|
|
18
|
+
*/
|
|
19
|
+
createLoginResponse(params: {
|
|
20
|
+
sp: ServiceProvider;
|
|
21
|
+
requestInfo: Record<string, any>;
|
|
22
|
+
binding?: string;
|
|
23
|
+
user: Record<string, any>;
|
|
24
|
+
customTagReplacement?: (template: string) => BindingContext;
|
|
25
|
+
encryptThenSign?: boolean;
|
|
26
|
+
relayState?: string;
|
|
27
|
+
context: Record<string, any>;
|
|
28
|
+
AttributeStatement: [];
|
|
29
|
+
}): Promise<any>;
|
|
30
|
+
/**
|
|
31
|
+
* Validation of the parsed URL parameters
|
|
32
|
+
* @param sp ServiceProvider instance
|
|
33
|
+
* @param binding Protocol binding
|
|
34
|
+
* @param req RequesmessageSigningOrderst
|
|
35
|
+
*/
|
|
36
|
+
parseLoginRequest(sp: ServiceProvider, binding: string, req: ESamlHttpRequest): Promise<FlowResult>;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=entity-idp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-idp.d.ts","sourceRoot":"","sources":["../src/entity-idp.ts"],"names":[],"mappings":"AAYA,OAAO,MAAM,EAAE,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EACL,0BAA0B,IAAI,eAAe,EAE7C,wBAAwB,EACxB,KAAK,wBAAwB,EAC9B,MAAM,YAAY,CAAC;AAMpB,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAO,WAAW,CAAC;AAEnD,OAAO,KAAM,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEnD;;GAEG;AACH,MAAM,CAAC,OAAO,WAAU,KAAK,EAAE,wBAAwB,oBAEtD;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,MAAM;IAElC,UAAU,EAAE,wBAAwB,CAAC;gBAEjC,UAAU,EAAE,wBAAwB;IAqChD;;;OAGG;IACU,mBAAmB,CAAC,MAAM,EAAC;QACtC,EAAE,EAAE,eAAe,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACjC,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC1B,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,CAAC;QAC5D,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC7B,kBAAkB,EAAC,EAAE,CAAA;KACtB;IAyCD;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,gBAAgB;CAY9E"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file entity-sp.ts
|
|
3
|
+
* @author tngan
|
|
4
|
+
* @desc Declares the actions taken by service provider
|
|
5
|
+
*/
|
|
6
|
+
import Entity from './entity.js';
|
|
7
|
+
import type { BindingContext, PostBindingContext, ESamlHttpRequest, SimpleSignBindingContext } from './entity.js';
|
|
8
|
+
import { IdentityProviderConstructor as IdentityProvider, ServiceProviderMetadata, type ServiceProviderSettings } from './types.js';
|
|
9
|
+
import { type FlowResult } from './flow.js';
|
|
10
|
+
export default function (props: ServiceProviderSettings): ServiceProvider;
|
|
11
|
+
/**
|
|
12
|
+
* @desc Service provider can be configured using either metadata importing or spSetting
|
|
13
|
+
* @param {object} spSettingimport { FlowResult } from '../types/src/flow.d';
|
|
14
|
+
|
|
15
|
+
*/
|
|
16
|
+
export declare class ServiceProvider extends Entity {
|
|
17
|
+
entityMeta: ServiceProviderMetadata;
|
|
18
|
+
/**
|
|
19
|
+
* @desc Inherited from Entity
|
|
20
|
+
* @param {object} spSetting setting of service provider
|
|
21
|
+
*/
|
|
22
|
+
constructor(spSetting: ServiceProviderSettings);
|
|
23
|
+
/**
|
|
24
|
+
* @desc Generates the login request for developers to design their own method
|
|
25
|
+
* @param {IdentityProvider} idp object of identity provider
|
|
26
|
+
* @param {string} binding protocol binding
|
|
27
|
+
* @param {function} customTagReplacement used when developers have their own login response template
|
|
28
|
+
*/
|
|
29
|
+
createLoginRequest(idp: IdentityProvider, binding?: string, customTagReplacement?: (template: string) => BindingContext): BindingContext | PostBindingContext | SimpleSignBindingContext;
|
|
30
|
+
/**
|
|
31
|
+
* @desc Validation of the parsed the URL parameters
|
|
32
|
+
* @param {IdentityProvider} idp object of identity provider
|
|
33
|
+
* @param {string} binding protocol binding
|
|
34
|
+
* @param {request} req request
|
|
35
|
+
*/
|
|
36
|
+
parseLoginResponse(idp: any, binding: any, request: ESamlHttpRequest): Promise<FlowResult>;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=entity-sp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-sp.d.ts","sourceRoot":"","sources":["../src/entity-sp.ts"],"names":[],"mappings":"AAAA;;;;EAIE;AACF,OAAO,MAEN,MAAM,aAAa,CAAC;AACrB,OAAQ,KAAK,EAAG,cAAc,EAC5B,kBAAkB,EAClB,gBAAgB,EAChB,wBAAwB,EAAE,MAAK,aAAa,CAAC;AAC/C,OAAO,EACL,2BAA2B,IAAI,gBAAgB,EAC/C,uBAAuB,EACvB,KAAK,uBAAuB,EAC7B,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAO,WAAW,CAAC;AAKnD,MAAM,CAAC,OAAO,WAAU,KAAK,EAAE,uBAAuB,mBAErD;AAED;;;;EAIE;AACF,qBAAa,eAAgB,SAAQ,MAAM;IAChC,UAAU,EAAE,uBAAuB,CAAC;IAE7C;;;MAGE;gBACU,SAAS,EAAE,uBAAuB;IAS9C;;;;;MAKE;IACK,kBAAkB,CACvB,GAAG,EAAE,gBAAgB,EACrB,OAAO,SAAa,EACpB,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,GAC1D,cAAc,GAAG,kBAAkB,GAAE,wBAAwB;IAkChE;;;;;MAKE;IACK,kBAAkB,CAAC,GAAG,KAAA,EAAE,OAAO,KAAA,EAAE,OAAO,EAAE,gBAAgB;CAalE"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { IdpMetadata as IdpMetadataConstructor } from './metadata-idp.js';
|
|
2
|
+
import { SpMetadata as SpMetadataConstructor } from './metadata-sp.js';
|
|
3
|
+
import type { MetadataIdpConstructor, MetadataSpConstructor, EntitySetting } from './types.js';
|
|
4
|
+
import { type FlowResult } from './flow.js';
|
|
5
|
+
export interface ESamlHttpRequest {
|
|
6
|
+
query?: any;
|
|
7
|
+
body?: any;
|
|
8
|
+
octetString?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface BindingContext {
|
|
11
|
+
context: string;
|
|
12
|
+
id: string;
|
|
13
|
+
}
|
|
14
|
+
export interface PostBindingContext extends BindingContext {
|
|
15
|
+
relayState?: string;
|
|
16
|
+
entityEndpoint: string;
|
|
17
|
+
type: string;
|
|
18
|
+
}
|
|
19
|
+
export interface SimpleSignBindingContext extends PostBindingContext {
|
|
20
|
+
sigAlg?: string;
|
|
21
|
+
signature?: string;
|
|
22
|
+
keyInfo?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface SimpleSignComputedContext extends BindingContext {
|
|
25
|
+
sigAlg?: string;
|
|
26
|
+
signature?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ParseResult {
|
|
29
|
+
samlContent: string;
|
|
30
|
+
extract: any;
|
|
31
|
+
sigAlg: string;
|
|
32
|
+
}
|
|
33
|
+
export type EntityConstructor = (MetadataIdpConstructor | MetadataSpConstructor) & {
|
|
34
|
+
metadata?: string | Buffer;
|
|
35
|
+
};
|
|
36
|
+
export default class Entity {
|
|
37
|
+
entitySetting: EntitySetting;
|
|
38
|
+
entityType: string;
|
|
39
|
+
entityMeta: IdpMetadataConstructor | SpMetadataConstructor;
|
|
40
|
+
/**
|
|
41
|
+
* @param entitySetting
|
|
42
|
+
* @param entityMeta is the entity metadata, deprecated after 2.0
|
|
43
|
+
*/
|
|
44
|
+
constructor(entitySetting: EntityConstructor, entityType: 'idp' | 'sp');
|
|
45
|
+
/**
|
|
46
|
+
* @desc Returns the setting of entity
|
|
47
|
+
* @return {object}
|
|
48
|
+
*/
|
|
49
|
+
getEntitySetting(): EntitySetting;
|
|
50
|
+
/**
|
|
51
|
+
* @desc Returns the xml string of entity metadata
|
|
52
|
+
* @return {string}
|
|
53
|
+
*/
|
|
54
|
+
getMetadata(): string;
|
|
55
|
+
/**
|
|
56
|
+
* @desc Exports the entity metadata into specified folder
|
|
57
|
+
* @param {string} exportFile indicates the file name
|
|
58
|
+
*/
|
|
59
|
+
exportMetadata(exportFile: string): void;
|
|
60
|
+
/** * @desc Verify fields with the one specified in metadata
|
|
61
|
+
* @param {string/[string]} field is a string or an array of string indicating the field value in SAML message
|
|
62
|
+
* @param {string} metaField is a string indicating the same field specified in metadata
|
|
63
|
+
* @return {boolean} True/False
|
|
64
|
+
*/
|
|
65
|
+
verifyFields(field: string | string[], metaField: string): boolean;
|
|
66
|
+
/** @desc Generates the logout request for developers to design their own method
|
|
67
|
+
* @param {ServiceProvider} sp object of service provider
|
|
68
|
+
* @param {string} binding protocol binding
|
|
69
|
+
* @param {object} user current logged user (e.g. user)
|
|
70
|
+
* @param {string} relayState the URL to which to redirect the user when logout is complete
|
|
71
|
+
* @param {function} customTagReplacement used when developers have their own login response template
|
|
72
|
+
*/
|
|
73
|
+
createLogoutRequest(targetEntity: any, binding: any, user: any, relayState?: string, customTagReplacement?: any): BindingContext | PostBindingContext;
|
|
74
|
+
/**
|
|
75
|
+
* @desc Generates the logout response for developers to design their own method
|
|
76
|
+
* @param {IdentityProvider} idp object of identity provider
|
|
77
|
+
* @param {object} requestInfo corresponding request, used to obtain the id
|
|
78
|
+
* @param {string} relayState the URL to which to redirect the user when logout is complete.
|
|
79
|
+
* @param {string} binding protocol binding
|
|
80
|
+
* @param {function} customTagReplacement used when developers have their own login response template
|
|
81
|
+
*/
|
|
82
|
+
createLogoutResponse(target: any, requestInfo: any, binding: any, relayState?: string, customTagReplacement?: any): BindingContext | PostBindingContext;
|
|
83
|
+
/**
|
|
84
|
+
* @desc Validation of the parsed the URL parameters
|
|
85
|
+
* @param {IdentityProvider} idp object of identity provider
|
|
86
|
+
* @param {string} binding protocol binding
|
|
87
|
+
* @param {request} req request
|
|
88
|
+
* @return {Promise}
|
|
89
|
+
*/
|
|
90
|
+
parseLogoutRequest(from: any, binding: any, request: ESamlHttpRequest): Promise<FlowResult>;
|
|
91
|
+
/**
|
|
92
|
+
* @desc Validation of the parsed the URL parameters
|
|
93
|
+
* @param {object} config config for the parser
|
|
94
|
+
* @param {string} binding protocol binding
|
|
95
|
+
* @param {request} req request
|
|
96
|
+
* @return {Promise}
|
|
97
|
+
*/
|
|
98
|
+
parseLogoutResponse(from: any, binding: any, request: ESamlHttpRequest): Promise<FlowResult>;
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../src/entity.ts"],"names":[],"mappings":"AAQA,OAAoB,EAAE,WAAW,IAAI,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACvF,OAAmB,EAAE,UAAU,IAAI,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGnF,OAAQ,KAAK,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChG,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAO,WAAW,CAAC;AAoBnD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACxD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,wBAAyB,SAAQ,kBAAkB;IAClE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,yBAA0B,SAAQ,cAAc;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,GAAG,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,iBAAiB,GAAG,CAAC,sBAAsB,GAAG,qBAAqB,CAAC,GAC5E;IAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAEnC,MAAM,CAAC,OAAO,OAAO,MAAM;IACzB,aAAa,EAAE,aAAa,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,sBAAsB,GAAG,qBAAqB,CAAC;IAE3D;;;MAGE;gBACU,aAAa,EAAE,iBAAiB,EAAE,UAAU,EAAE,KAAK,GAAG,IAAI;IAsBtE;;;MAGE;IACF,gBAAgB;IAGhB;;;MAGE;IACF,WAAW,IAAI,MAAM;IAIrB;;;MAGE;IACF,cAAc,CAAC,UAAU,EAAE,MAAM;IAIjC;;;;MAIE;IACF,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO;IAgBlE;;;;;;MAME;IACF,mBAAmB,CAAC,YAAY,KAAA,EAAE,OAAO,KAAA,EAAE,IAAI,KAAA,EAAE,UAAU,SAAK,EAAE,oBAAoB,CAAC,KAAA,GAAG,cAAc,GAAG,kBAAkB;IAqB7H;;;;;;;MAOE;IACF,oBAAoB,CAAC,MAAM,KAAA,EAAE,WAAW,KAAA,EAAE,OAAO,KAAA,EAAE,UAAU,SAAK,EAAE,oBAAoB,CAAC,KAAA,GAAG,cAAc,GAAG,kBAAkB;IAuB/H;;;;;;MAME;IACF,kBAAkB,CAAC,IAAI,KAAA,EAAE,OAAO,KAAA,EAAE,OAAO,EAAE,gBAAgB;IAY3D;;;;;;MAME;IACF,mBAAmB,CAAC,IAAI,KAAA,EAAE,OAAO,KAAA,EAAE,OAAO,EAAE,gBAAgB;CAY7D"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
interface ExtractorField {
|
|
2
|
+
key: string;
|
|
3
|
+
localPath: string[] | string[][];
|
|
4
|
+
attributes: string[];
|
|
5
|
+
index?: string[];
|
|
6
|
+
attributePath?: string[];
|
|
7
|
+
context?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export type ExtractorFields = ExtractorField[];
|
|
10
|
+
export declare const loginRequestFields: ExtractorFields;
|
|
11
|
+
export declare const loginResponseStatusFields: {
|
|
12
|
+
key: string;
|
|
13
|
+
localPath: string[];
|
|
14
|
+
attributes: string[];
|
|
15
|
+
}[];
|
|
16
|
+
export declare const logoutResponseStatusFields: {
|
|
17
|
+
key: string;
|
|
18
|
+
localPath: string[];
|
|
19
|
+
attributes: string[];
|
|
20
|
+
}[];
|
|
21
|
+
export declare const loginResponseFields: ((assertion: any) => ExtractorFields);
|
|
22
|
+
export declare const logoutRequestFields: ExtractorFields;
|
|
23
|
+
export declare const logoutResponseFields: ExtractorFields;
|
|
24
|
+
export declare function extract(context: string, fields: any): any;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=extractor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractor.d.ts","sourceRoot":"","sources":["../src/extractor.ts"],"names":[],"mappings":"AAKA,UAAU,cAAc;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,EAAE,CAAC;IACjC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,MAAM,eAAe,GAAG,cAAc,EAAE,CAAC;AA4B/C,eAAO,MAAM,kBAAkB,EAAE,eA2BhC,CAAC;AAGF,eAAO,MAAM,yBAAyB;;;;GAWrC,CAAC;AAGF,eAAO,MAAM,0BAA0B;;;;GAWtC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,CAAC,CAAC,SAAS,EAAE,GAAG,KAAK,eAAe,CAiDrE,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,eA2BjC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,eAiBlC,CAAC;AAEF,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,KAAA,OAiM9C"}
|
package/types/flow.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../src/flow.ts"],"names":[],"mappings":"AAyBA,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,GAAG,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,GAAC,IAAI,CAAE;CACvB;AA4ZD,wBAAgB,IAAI,CAAC,OAAO,KAAA,GAAG,OAAO,CAAC,UAAU,CAAC,CAyBjD"}
|