samlesa 2.16.0 → 2.16.1
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/libsaml.js +26 -0
- package/build/src/schemaValidator.js +27 -0
- package/package.json +2 -2
- 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/libsaml.d.ts.map +1 -1
- package/types/src/schemaValidator.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>
|
package/build/src/libsaml.js
CHANGED
|
@@ -152,6 +152,12 @@ const libSaml = () => {
|
|
|
152
152
|
}
|
|
153
153
|
return nrsaAliasMappingForNode[signatureAlgorithms.RSA_SHA256];
|
|
154
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* @private
|
|
157
|
+
* @desc Get the signing scheme alias by signature algorithms, used by the node-rsa module
|
|
158
|
+
* @param {string} sigAlg signature algorithm
|
|
159
|
+
* @return {string/null} signing algorithm short-hand for the module node-rsa
|
|
160
|
+
*/
|
|
155
161
|
/**
|
|
156
162
|
* @private
|
|
157
163
|
* @desc Get the digest algorithms by signature algorithms
|
|
@@ -538,6 +544,26 @@ const libSaml = () => {
|
|
|
538
544
|
throw new Error(`SAML 签名失败: ${error.message}`);
|
|
539
545
|
}
|
|
540
546
|
},
|
|
547
|
+
/* constructMessageSignature(
|
|
548
|
+
octetString: string,
|
|
549
|
+
key: string,
|
|
550
|
+
passphrase?: string,
|
|
551
|
+
isBase64?: boolean,
|
|
552
|
+
signingAlgorithm?: string
|
|
553
|
+
) {
|
|
554
|
+
// Default returning base64 encoded signature
|
|
555
|
+
// Embed with node-rsa module
|
|
556
|
+
const decryptedKey = new nrsa(
|
|
557
|
+
utility.readPrivateKey(key, passphrase),
|
|
558
|
+
undefined,
|
|
559
|
+
{
|
|
560
|
+
signingScheme: getSigningScheme(signingAlgorithm),
|
|
561
|
+
}
|
|
562
|
+
);
|
|
563
|
+
const signature = decryptedKey.sign(octetString);
|
|
564
|
+
// Use private key to sign data
|
|
565
|
+
return isBase64 !== false ? signature.toString('base64') : signature;
|
|
566
|
+
},*/
|
|
541
567
|
verifyMessageSignature(metadata, octetString, signature, verifyAlgorithm) {
|
|
542
568
|
const signCert = metadata.getX509Certificate(certUse.signing);
|
|
543
569
|
const signingScheme = getSigningSchemeForNode(verifyAlgorithm);
|
|
@@ -15,7 +15,34 @@ const schemas = [
|
|
|
15
15
|
'saml-schema-ecp-2.0.xsd',
|
|
16
16
|
'saml-schema-dce-2.0.xsd'
|
|
17
17
|
];
|
|
18
|
+
function detectXXEIndicators(samlString) {
|
|
19
|
+
const xxePatterns = [
|
|
20
|
+
/<!DOCTYPE\s[^>]*>/i,
|
|
21
|
+
/<!ENTITY\s+[^\s>]+\s+(?:SYSTEM|PUBLIC)\s+['"][^>]*>/i,
|
|
22
|
+
/&[a-zA-Z0-9._-]+;/g,
|
|
23
|
+
/SYSTEM\s*=/i,
|
|
24
|
+
/PUBLIC\s*=/i,
|
|
25
|
+
/file:\/\//,
|
|
26
|
+
/\.dtd['"]?/
|
|
27
|
+
];
|
|
28
|
+
const matches = {};
|
|
29
|
+
xxePatterns.forEach((pattern, index) => {
|
|
30
|
+
const found = samlString.match(pattern);
|
|
31
|
+
if (found) {
|
|
32
|
+
matches[`pattern_${index}`] = {
|
|
33
|
+
pattern: pattern.toString(),
|
|
34
|
+
matches: found
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
return Object.keys(matches).length > 0 ? matches : null;
|
|
39
|
+
}
|
|
18
40
|
export const validate = async (xml) => {
|
|
41
|
+
const indicators = detectXXEIndicators(xml);
|
|
42
|
+
if (indicators) {
|
|
43
|
+
console.error('XXE风险特征:', indicators);
|
|
44
|
+
throw new Error('ERR_EXCEPTION_VALIDATE_XML');
|
|
45
|
+
}
|
|
19
46
|
const schemaPath = path.resolve(__dirname, 'schema');
|
|
20
47
|
const [schema, ...preload] = await Promise.all(schemas.map(async (file) => ({
|
|
21
48
|
fileName: file,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "samlesa",
|
|
3
|
-
"version": "2.16.
|
|
3
|
+
"version": "2.16.1",
|
|
4
4
|
"description": "High-level API for Single Sign On (SAML 2.0) baseed on samlify ",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"keywords": [
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@microsoft/api-extractor": "7.52.8",
|
|
58
|
-
"@types/node": "^
|
|
58
|
+
"@types/node": "^24.0.10",
|
|
59
59
|
"@types/pako": "2.0.3",
|
|
60
60
|
"@types/uuid": "10.0.0",
|
|
61
61
|
"ava": "^4.3.3",
|
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"}
|