samlesa 4.3.4 → 4.4.0
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 +19 -16
- package/build/src/artifact.js +55 -0
- package/build/src/binding-artifact.js +477 -363
- package/build/src/binding-post.js +7 -3
- package/build/src/entity-idp.js +51 -3
- package/build/src/entity-sp.js +35 -30
- package/build/src/extractor.js +21 -4
- package/build/src/libsamlSoap.js +88 -96
- package/build/src/metadata.js +0 -1
- package/build/src/soap.js +34 -105
- package/package.json +87 -87
- package/types/src/artifact.d.ts +14 -0
- package/types/src/artifact.d.ts.map +1 -0
- package/types/src/binding-artifact.d.ts +92 -58
- package/types/src/binding-artifact.d.ts.map +1 -1
- package/types/src/binding-post.d.ts +1 -1
- package/types/src/binding-post.d.ts.map +1 -1
- package/types/src/entity-idp.d.ts +42 -2
- package/types/src/entity-idp.d.ts.map +1 -1
- package/types/src/entity-sp.d.ts +16 -17
- package/types/src/entity-sp.d.ts.map +1 -1
- package/types/src/extractor.d.ts.map +1 -1
- package/types/src/flow.d.ts.map +1 -1
- package/types/src/libsamlSoap.d.ts +9 -2
- package/types/src/libsamlSoap.d.ts.map +1 -1
- package/types/src/metadata.d.ts.map +1 -1
- package/types/src/soap.d.ts +5 -25
- package/types/src/soap.d.ts.map +1 -1
- package/types/src/types.d.ts +1 -0
- package/types/src/types.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "samlesa",
|
|
3
|
-
"version": "4.
|
|
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
|
-
"homepage": "https://saml.veclea.com",
|
|
16
|
-
"scripts": {
|
|
17
|
-
"build": "tsc && copyfiles -u 1 src/schema/**/* build/src",
|
|
18
|
-
"build:fast": "tsc",
|
|
19
|
-
"build:clean": "tsc --build --clean && pnpm run build",
|
|
20
|
-
"docs:dev": "cd docs && npm run docs:dev",
|
|
21
|
-
"docs:build": "cd docs && npm run docs:build",
|
|
22
|
-
"docs:preview": "cd docs && npm run docs:preview",
|
|
23
|
-
"docs:deploy": "vercel --prod",
|
|
24
|
-
"lint": "tslint -p .",
|
|
25
|
-
"lint:fix": "tslint -p . --fix",
|
|
26
|
-
"test": "vitest run",
|
|
27
|
-
"test:watch": "vitest",
|
|
28
|
-
"test:coverage": "vitest run --coverage",
|
|
29
|
-
"test:fast": "vitest run --pool=forks",
|
|
30
|
-
"test:artifact": "vitest run test/artifact.test.ts",
|
|
31
|
-
"generate-certs": "node scripts/generate-certs.js",
|
|
32
|
-
"hooks:postinstall": "mklink /J .git\\hooks\\pre-commit .pre-commit.sh || copy .pre-commit.sh .git\\hooks\\pre-commit"
|
|
33
|
-
},
|
|
34
|
-
"exports": {
|
|
35
|
-
".": {
|
|
36
|
-
"types": "./types/index.d.ts",
|
|
37
|
-
"import": "./build/index.js"
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
"files": [
|
|
41
|
-
"build",
|
|
42
|
-
"types"
|
|
43
|
-
],
|
|
44
|
-
"contributors": [
|
|
45
|
-
"Veclea <vemocle@gmail.com>"
|
|
46
|
-
],
|
|
47
|
-
"author": "Veclea",
|
|
48
|
-
"repository": {
|
|
49
|
-
"url": "https://github.com/Veclea/samlify.git",
|
|
50
|
-
"type": "git"
|
|
51
|
-
},
|
|
52
|
-
"bugs": {
|
|
53
|
-
"url": "https://github.com/Veclea/samlify/issues"
|
|
54
|
-
},
|
|
55
|
-
"docs": "https://saml.veclea.com",
|
|
56
|
-
"license": "MIT",
|
|
57
|
-
"dependencies": {
|
|
58
|
-
"@xmldom/xmldom": "^0.9.
|
|
59
|
-
"axios": "^1.
|
|
60
|
-
"camelcase": "^9.0.0",
|
|
61
|
-
"cross-env": "^10.1.0",
|
|
62
|
-
"iconv-lite": "^0.7.2",
|
|
63
|
-
"ts-node": "^10.9.2",
|
|
64
|
-
"vite-tsconfig-paths": "^6.1.1",
|
|
65
|
-
"xml": "^1.0.1",
|
|
66
|
-
"xml-crypto-next": "^8.0.0",
|
|
67
|
-
"xml-encryption-next": "^5.0.0",
|
|
68
|
-
"xml-escape": "^1.1.0",
|
|
69
|
-
"xml2js": "^0.6.2",
|
|
70
|
-
"xmllint-wasm": "^5.2.0",
|
|
71
|
-
"xpath": "^0.0.34"
|
|
72
|
-
},
|
|
73
|
-
"devDependencies": {
|
|
74
|
-
"@types/node": "^25.
|
|
75
|
-
"@types/pako": "2.0.4",
|
|
76
|
-
"@types/uuid": "11.0.0",
|
|
77
|
-
"@vitest/coverage-istanbul": "^4.1.
|
|
78
|
-
"@vitest/coverage-v8": "4.1.
|
|
79
|
-
"copyfiles": "^2.4.1",
|
|
80
|
-
"coveralls": "^3.1.1",
|
|
81
|
-
"esbuild": "^0.
|
|
82
|
-
"jsdom": "^29.0.
|
|
83
|
-
"timekeeper": "^2.3.1",
|
|
84
|
-
"typescript": "6.0.
|
|
85
|
-
"vitest": "^4.1.
|
|
86
|
-
}
|
|
87
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "samlesa",
|
|
3
|
+
"version": "4.4.0",
|
|
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
|
+
"homepage": "https://saml.veclea.com",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsc && copyfiles -u 1 src/schema/**/* build/src",
|
|
18
|
+
"build:fast": "tsc",
|
|
19
|
+
"build:clean": "tsc --build --clean && pnpm run build",
|
|
20
|
+
"docs:dev": "cd docs && npm run docs:dev",
|
|
21
|
+
"docs:build": "cd docs && npm run docs:build",
|
|
22
|
+
"docs:preview": "cd docs && npm run docs:preview",
|
|
23
|
+
"docs:deploy": "vercel --prod",
|
|
24
|
+
"lint": "tslint -p .",
|
|
25
|
+
"lint:fix": "tslint -p . --fix",
|
|
26
|
+
"test": "vitest run",
|
|
27
|
+
"test:watch": "vitest",
|
|
28
|
+
"test:coverage": "vitest run --coverage",
|
|
29
|
+
"test:fast": "vitest run --pool=forks",
|
|
30
|
+
"test:artifact": "vitest run test/artifact.test.ts",
|
|
31
|
+
"generate-certs": "node scripts/generate-certs.js",
|
|
32
|
+
"hooks:postinstall": "mklink /J .git\\hooks\\pre-commit .pre-commit.sh || copy .pre-commit.sh .git\\hooks\\pre-commit"
|
|
33
|
+
},
|
|
34
|
+
"exports": {
|
|
35
|
+
".": {
|
|
36
|
+
"types": "./types/index.d.ts",
|
|
37
|
+
"import": "./build/index.js"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"files": [
|
|
41
|
+
"build",
|
|
42
|
+
"types"
|
|
43
|
+
],
|
|
44
|
+
"contributors": [
|
|
45
|
+
"Veclea <vemocle@gmail.com>"
|
|
46
|
+
],
|
|
47
|
+
"author": "Veclea",
|
|
48
|
+
"repository": {
|
|
49
|
+
"url": "https://github.com/Veclea/samlify.git",
|
|
50
|
+
"type": "git"
|
|
51
|
+
},
|
|
52
|
+
"bugs": {
|
|
53
|
+
"url": "https://github.com/Veclea/samlify/issues"
|
|
54
|
+
},
|
|
55
|
+
"docs": "https://saml.veclea.com",
|
|
56
|
+
"license": "MIT",
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@xmldom/xmldom": "^0.9.10",
|
|
59
|
+
"axios": "^1.15.2",
|
|
60
|
+
"camelcase": "^9.0.0",
|
|
61
|
+
"cross-env": "^10.1.0",
|
|
62
|
+
"iconv-lite": "^0.7.2",
|
|
63
|
+
"ts-node": "^10.9.2",
|
|
64
|
+
"vite-tsconfig-paths": "^6.1.1",
|
|
65
|
+
"xml": "^1.0.1",
|
|
66
|
+
"xml-crypto-next": "^8.0.0",
|
|
67
|
+
"xml-encryption-next": "^5.0.0",
|
|
68
|
+
"xml-escape": "^1.1.0",
|
|
69
|
+
"xml2js": "^0.6.2",
|
|
70
|
+
"xmllint-wasm": "^5.2.0",
|
|
71
|
+
"xpath": "^0.0.34"
|
|
72
|
+
},
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@types/node": "^25.6.0",
|
|
75
|
+
"@types/pako": "2.0.4",
|
|
76
|
+
"@types/uuid": "11.0.0",
|
|
77
|
+
"@vitest/coverage-istanbul": "^4.1.5",
|
|
78
|
+
"@vitest/coverage-v8": "4.1.5",
|
|
79
|
+
"copyfiles": "^2.4.1",
|
|
80
|
+
"coveralls": "^3.1.1",
|
|
81
|
+
"esbuild": "^0.28.0",
|
|
82
|
+
"jsdom": "^29.0.2",
|
|
83
|
+
"timekeeper": "^2.3.1",
|
|
84
|
+
"typescript": "6.0.3",
|
|
85
|
+
"vitest": "^4.1.5"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const SAML2_ARTIFACT_TYPE_CODE = 4;
|
|
2
|
+
export declare const SAML2_ARTIFACT_LENGTH = 44;
|
|
3
|
+
export interface ParsedArtifact {
|
|
4
|
+
artifact: string;
|
|
5
|
+
typeCode: number;
|
|
6
|
+
endpointIndex: number;
|
|
7
|
+
sourceId: string;
|
|
8
|
+
messageHandle: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function computeArtifactSourceId(entityId: string): Buffer;
|
|
11
|
+
export declare function generateArtifactId(entityId: string, endpointIndex?: number): string;
|
|
12
|
+
export declare function parseArtifact(artifact: string): ParsedArtifact;
|
|
13
|
+
export declare function validateArtifact(artifact: string, expectedEntityId?: string): ParsedArtifact;
|
|
14
|
+
//# sourceMappingURL=artifact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifact.d.ts","sourceRoot":"","sources":["../../src/artifact.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB,IAAS,CAAC;AAC/C,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,aAAa,SAAI,GAAG,MAAM,CAsB9E;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAsB9D;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,MAAM,GAAG,cAAc,CAS5F"}
|
|
@@ -1,71 +1,105 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file binding-artifact.ts
|
|
3
|
-
* @
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* @desc Binding-level API for SAML 2.0 HTTP-Artifact Binding
|
|
4
|
+
*
|
|
5
|
+
* The Artifact binding has two distinct layers:
|
|
6
|
+
* 1. Front-channel delivery of `SAMLart`
|
|
7
|
+
* 2. Back-channel SOAP `ArtifactResolve` / `ArtifactResponse`
|
|
6
8
|
*/
|
|
7
|
-
import type { BindingContext } from './entity.js';
|
|
8
|
-
import { IdentityProviderConstructor as IdentityProvider, ServiceProviderConstructor as ServiceProvider } from
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
declare function
|
|
9
|
+
import type { BindingContext, ESamlHttpRequest } from './entity.js';
|
|
10
|
+
import type { Base64LoginResponseParams, IdentityProviderConstructor as IdentityProvider, ServiceProviderConstructor as ServiceProvider } from './types.js';
|
|
11
|
+
import { generateArtifactId as generateArtifactIdUtil } from './artifact.js';
|
|
12
|
+
type ArtifactParticipant = IdentityProvider | ServiceProvider;
|
|
13
|
+
export interface ArtifactBindingContext extends BindingContext {
|
|
14
|
+
artifact: string;
|
|
15
|
+
samlContent: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ArtifactResolveContext extends BindingContext {
|
|
18
|
+
artifact: string;
|
|
19
|
+
entityEndpoint: string;
|
|
20
|
+
type: 'ArtifactResolve';
|
|
21
|
+
}
|
|
22
|
+
declare function createArtifactResolveRequest(params: {
|
|
23
|
+
requester: ArtifactParticipant;
|
|
24
|
+
responder: ArtifactParticipant;
|
|
25
|
+
artifact: string;
|
|
26
|
+
}): ArtifactResolveContext;
|
|
27
|
+
declare function parseArtifactResolveRequest(params: {
|
|
28
|
+
requester: ArtifactParticipant;
|
|
29
|
+
responder: ArtifactParticipant;
|
|
30
|
+
xml: string;
|
|
31
|
+
}): Promise<{
|
|
32
|
+
soapContent: string;
|
|
33
|
+
samlContent: string;
|
|
34
|
+
extract: any;
|
|
35
|
+
artifact: any;
|
|
36
|
+
artifactData: import("./artifact.js").ParsedArtifact;
|
|
37
|
+
}>;
|
|
38
|
+
declare function createArtifactResolveResponse(params: {
|
|
39
|
+
requester: ArtifactParticipant;
|
|
40
|
+
responder: ArtifactParticipant;
|
|
41
|
+
inResponseTo: string;
|
|
42
|
+
samlMessage?: string;
|
|
43
|
+
statusCode?: string;
|
|
44
|
+
}): {
|
|
45
|
+
id: string;
|
|
46
|
+
context: string;
|
|
47
|
+
};
|
|
48
|
+
declare function parseArtifactResolveResponse(params: {
|
|
49
|
+
requester: ArtifactParticipant;
|
|
50
|
+
responder: ArtifactParticipant;
|
|
51
|
+
xml: string;
|
|
52
|
+
inResponseTo?: string;
|
|
53
|
+
}): Promise<{
|
|
54
|
+
soapContent: string;
|
|
55
|
+
samlContent: string;
|
|
56
|
+
extract: any;
|
|
57
|
+
}>;
|
|
58
|
+
declare function createLoginRequest(referenceTagXPath: string, entity: {
|
|
26
59
|
idp: IdentityProvider;
|
|
27
60
|
sp: ServiceProvider;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* @desc Generate a SOAP-encoded login response for Artifact binding
|
|
33
|
-
* @param {Base64LoginResponseParams} params parameters for generating login response
|
|
34
|
-
* @returns {BindingContext}
|
|
35
|
-
*/
|
|
36
|
-
declare function soapLoginResponse(params: Base64LoginResponseParams): Promise<BindingContext>;
|
|
37
|
-
/**
|
|
38
|
-
* @desc Parse and validate Artifact Resolve request
|
|
39
|
-
* @param {object} params
|
|
40
|
-
* @param {IdentityProvider} params.idp Identity Provider instance
|
|
41
|
-
* @param {ServiceProvider} params.sp Service Provider instance
|
|
42
|
-
* @param {string} params.xml SOAP request XML string
|
|
43
|
-
* @returns {Promise}
|
|
44
|
-
*/
|
|
45
|
-
declare function parseLoginRequestResolve(params: {
|
|
61
|
+
}, customTagReplacement?: (template: string) => BindingContext): ArtifactBindingContext;
|
|
62
|
+
declare function createLoginResponse(params: Base64LoginResponseParams): Promise<ArtifactBindingContext>;
|
|
63
|
+
declare function parseLoginRequest(params: {
|
|
46
64
|
idp: IdentityProvider;
|
|
47
65
|
sp: ServiceProvider;
|
|
48
|
-
|
|
49
|
-
}): Promise<
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
66
|
+
request: ESamlHttpRequest;
|
|
67
|
+
}): Promise<{
|
|
68
|
+
artifact: string;
|
|
69
|
+
relayState: any;
|
|
70
|
+
artifactResolve: {
|
|
71
|
+
request: ArtifactResolveContext;
|
|
72
|
+
response: any;
|
|
73
|
+
};
|
|
74
|
+
samlContent: string;
|
|
75
|
+
extract: any;
|
|
76
|
+
}>;
|
|
77
|
+
declare function parseLoginResponse(params: {
|
|
59
78
|
idp: IdentityProvider;
|
|
60
79
|
sp: ServiceProvider;
|
|
61
|
-
|
|
62
|
-
}): Promise<
|
|
80
|
+
request: ESamlHttpRequest;
|
|
81
|
+
}): Promise<{
|
|
82
|
+
artifact: string;
|
|
83
|
+
relayState: any;
|
|
84
|
+
artifactResolve: {
|
|
85
|
+
request: ArtifactResolveContext;
|
|
86
|
+
response: any;
|
|
87
|
+
};
|
|
88
|
+
samlContent: string;
|
|
89
|
+
extract: any;
|
|
90
|
+
sigAlg?: string | null;
|
|
91
|
+
}>;
|
|
92
|
+
export declare const generateArtifactId: typeof generateArtifactIdUtil;
|
|
63
93
|
declare const artifactBinding: {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
94
|
+
createLoginRequest: typeof createLoginRequest;
|
|
95
|
+
createLoginResponse: typeof createLoginResponse;
|
|
96
|
+
parseLoginRequest: typeof parseLoginRequest;
|
|
97
|
+
parseLoginResponse: typeof parseLoginResponse;
|
|
98
|
+
createArtifactResolveRequest: typeof createArtifactResolveRequest;
|
|
99
|
+
parseArtifactResolveRequest: typeof parseArtifactResolveRequest;
|
|
100
|
+
createArtifactResolveResponse: typeof createArtifactResolveResponse;
|
|
101
|
+
parseArtifactResolveResponse: typeof parseArtifactResolveResponse;
|
|
102
|
+
generateArtifactId: typeof generateArtifactIdUtil;
|
|
69
103
|
};
|
|
70
104
|
export default artifactBinding;
|
|
71
105
|
//# sourceMappingURL=binding-artifact.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binding-artifact.d.ts","sourceRoot":"","sources":["../../src/binding-artifact.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"binding-artifact.d.ts","sourceRoot":"","sources":["../../src/binding-artifact.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAapE,OAAO,KAAK,EACV,yBAAyB,EACzB,2BAA2B,IAAI,gBAAgB,EAC/C,0BAA0B,IAAI,eAAe,EAC9C,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,kBAAkB,IAAI,sBAAsB,EAE7C,MAAM,eAAe,CAAC;AAOvB,KAAK,mBAAmB,GAAG,gBAAgB,GAAG,eAAe,CAAC;AAU9D,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAkVD,iBAAS,4BAA4B,CAAC,MAAM,EAAE;IAC5C,SAAS,EAAE,mBAAmB,CAAC;IAC/B,SAAS,EAAE,mBAAmB,CAAC;IAC/B,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,sBAAsB,CA6BzB;AAED,iBAAe,2BAA2B,CAAC,MAAM,EAAE;IACjD,SAAS,EAAE,mBAAmB,CAAC;IAC/B,SAAS,EAAE,mBAAmB,CAAC;IAC/B,GAAG,EAAE,MAAM,CAAC;CACb;;;;;;GAyCA;AAED,iBAAS,6BAA6B,CAAC,MAAM,EAAE;IAC7C,SAAS,EAAE,mBAAmB,CAAC;IAC/B,SAAS,EAAE,mBAAmB,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;;;EA8BA;AAED,iBAAe,4BAA4B,CAAC,MAAM,EAAE;IAClD,SAAS,EAAE,mBAAmB,CAAC;IAC/B,SAAS,EAAE,mBAAmB,CAAC;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;;;;GA2CA;AAED,iBAAS,kBAAkB,CACzB,iBAAiB,EAAE,MAAM,EACzB,MAAM,EAAE;IACN,GAAG,EAAE,gBAAgB,CAAC;IACtB,EAAE,EAAE,eAAe,CAAC;CACrB,EACD,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,GAC1D,sBAAsB,CAaxB;AAED,iBAAe,mBAAmB,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAarG;AA4DD,iBAAe,iBAAiB,CAAC,MAAM,EAAE;IACvC,GAAG,EAAE,gBAAgB,CAAC;IACtB,EAAE,EAAE,eAAe,CAAC;IACpB,OAAO,EAAE,gBAAgB,CAAC;CAC3B;;;;;;;;;GAwCA;AAED,iBAAe,kBAAkB,CAAC,MAAM,EAAE;IACxC,GAAG,EAAE,gBAAgB,CAAC;IACtB,EAAE,EAAE,eAAe,CAAC;IACpB,OAAO,EAAE,gBAAgB,CAAC;CAC3B;;;;;;;;;;GAiCA;AAED,eAAO,MAAM,kBAAkB,+BAAyB,CAAC;AAEzD,QAAA,MAAM,eAAe;;;;;;;;;;CAUpB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -21,7 +21,7 @@ declare function base64LoginRequest(referenceTagXPath: string, entity: any, cust
|
|
|
21
21
|
* @param AttributeStatement
|
|
22
22
|
* @param idpInit
|
|
23
23
|
*/
|
|
24
|
-
declare function base64LoginResponse({ requestInfo, entity, user, customTagReplacement, encryptThenSign, AttributeStatement, idpInit }: Base64LoginResponseParams): Promise<BindingContext>;
|
|
24
|
+
declare function base64LoginResponse({ requestInfo, entity, user, customTagReplacement, encryptThenSign, AttributeStatement, idpInit, destinationBinding, }: Base64LoginResponseParams): Promise<BindingContext>;
|
|
25
25
|
/**
|
|
26
26
|
* @desc Generate a base64 encoded logout request
|
|
27
27
|
* @param {object} user current logged user (e.g. req.user)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binding-post.d.ts","sourceRoot":"","sources":["../../src/binding-post.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC;AAQhD,OAAO,EAAC,yBAAyB,EAAC,MAAM,YAAY,CAAC;AAMrD;;;;;GAKG;AACH,iBAAS,kBAAkB,CAAC,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,GAAG,cAAc,CAsE/I;AAGD;;;;;;;;;GASG;AACH,iBAAe,mBAAmB,CAAC,
|
|
1
|
+
{"version":3,"file":"binding-post.d.ts","sourceRoot":"","sources":["../../src/binding-post.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC;AAQhD,OAAO,EAAC,yBAAyB,EAAC,MAAM,YAAY,CAAC;AAMrD;;;;;GAKG;AACH,iBAAS,kBAAkB,CAAC,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,GAAG,cAAc,CAsE/I;AAGD;;;;;;;;;GASG;AACH,iBAAe,mBAAmB,CAAC,EAC/B,WAAgB,EAChB,MAAM,EACN,IAAS,EACT,oBAAoB,EACpB,eAAuB,EACvB,kBAAuB,EACvB,OAAO,EACP,kBAAiC,GACpC,EAAE,yBAAyB,GAAG,OAAO,CAAC,cAAc,CAAC,CAwJrD;AAED;;;;;;;GAOG;AACH,iBAAS,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,KAAA,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,GAAG,cAAc,CA2D1K;AAED;;;;;;GAMG;AACH,iBAAS,oBAAoB,CAAC,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,GAAG,cAAc,CA6DvI;AAED,QAAA,MAAM,WAAW;;;;;CAKhB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file entity-idp.ts
|
|
3
|
+
* @author tngan
|
|
4
|
+
* @desc Declares the actions taken by identity provider
|
|
5
|
+
*/
|
|
1
6
|
import Entity, { type ESamlHttpRequest } from './entity.js';
|
|
2
7
|
import { ServiceProviderConstructor as ServiceProvider, IdentityProviderMetadata, type IdentityProviderSettings } from './types.js';
|
|
3
|
-
import { type FlowResult } from './flow.js';
|
|
4
8
|
import type { BindingContext } from './entity.js';
|
|
5
9
|
/**
|
|
6
10
|
* Identity provider can be configured using either metadata importing or idpSetting
|
|
@@ -27,12 +31,48 @@ export declare class IdentityProvider extends Entity {
|
|
|
27
31
|
AttributeStatement?: [];
|
|
28
32
|
idpInit?: false;
|
|
29
33
|
}): Promise<any>;
|
|
34
|
+
createArtifactResolveRequest(sp: ServiceProvider, artifact: string): import("./binding-artifact.js").ArtifactResolveContext;
|
|
35
|
+
createArtifactResolveResponse(params: {
|
|
36
|
+
sp: ServiceProvider;
|
|
37
|
+
requestInfo?: Record<string, any>;
|
|
38
|
+
samlMessage?: string;
|
|
39
|
+
user?: Record<string, any>;
|
|
40
|
+
customTagReplacement?: (template: string) => BindingContext;
|
|
41
|
+
encryptThenSign?: boolean;
|
|
42
|
+
AttributeStatement?: [];
|
|
43
|
+
idpInit?: false;
|
|
44
|
+
inResponseTo?: string;
|
|
45
|
+
}): Promise<{
|
|
46
|
+
id: string;
|
|
47
|
+
context: string;
|
|
48
|
+
}>;
|
|
49
|
+
parseArtifactResolveRequest(sp: ServiceProvider, xml: string): Promise<{
|
|
50
|
+
soapContent: string;
|
|
51
|
+
samlContent: string;
|
|
52
|
+
extract: any;
|
|
53
|
+
artifact: any;
|
|
54
|
+
artifactData: import("./artifact.js").ParsedArtifact;
|
|
55
|
+
}>;
|
|
56
|
+
parseArtifactResolveResponse(sp: ServiceProvider, xml: string, inResponseTo?: string): Promise<{
|
|
57
|
+
soapContent: string;
|
|
58
|
+
samlContent: string;
|
|
59
|
+
extract: any;
|
|
60
|
+
}>;
|
|
30
61
|
/**
|
|
31
62
|
* Validation of the parsed URL parameters
|
|
32
63
|
* @param sp ServiceProvider instance
|
|
33
64
|
* @param binding Protocol binding
|
|
34
65
|
* @param req RequesmessageSigningOrderst
|
|
35
66
|
*/
|
|
36
|
-
parseLoginRequest(sp: ServiceProvider, binding: string, req: ESamlHttpRequest): Promise<FlowResult
|
|
67
|
+
parseLoginRequest(sp: ServiceProvider, binding: string, req: ESamlHttpRequest): Promise<import("./flow.js").FlowResult> | Promise<{
|
|
68
|
+
artifact: string;
|
|
69
|
+
relayState: any;
|
|
70
|
+
artifactResolve: {
|
|
71
|
+
request: import("./binding-artifact.js").ArtifactResolveContext;
|
|
72
|
+
response: any;
|
|
73
|
+
};
|
|
74
|
+
samlContent: string;
|
|
75
|
+
extract: any;
|
|
76
|
+
}>;
|
|
37
77
|
}
|
|
38
78
|
//# sourceMappingURL=entity-idp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-idp.d.ts","sourceRoot":"","sources":["../../src/entity-idp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"entity-idp.d.ts","sourceRoot":"","sources":["../../src/entity-idp.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,MAAM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5D,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,kBAAkB,CAAC,EAAE,EAAE,CAAC;QACxB,OAAO,CAAC,EAAE,KAAK,CAAC;QAChB,YAAY,CAAC,EAAE,MAAM,CAAC;KACzB;;;;IAkCM,2BAA2B,CAAC,EAAE,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM;;;;;;;IAQ5D,4BAA4B,CAAC,EAAE,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;;;;;IAS3F;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,gBAAgB;;;;;;;;;;CAmBhF"}
|
package/types/src/entity-sp.d.ts
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
import Entity from './entity.js';
|
|
7
7
|
import type { BindingContext, PostBindingContext, ESamlHttpRequest, SimpleSignBindingContext } from './entity.js';
|
|
8
8
|
import { IdentityProviderConstructor as IdentityProvider, ServiceProviderMetadata, type ServiceProviderSettings } from './types.js';
|
|
9
|
-
import { type FlowResult } from './flow.js';
|
|
10
9
|
export default function (props: ServiceProviderSettings): ServiceProvider;
|
|
11
10
|
/**
|
|
12
11
|
* @desc Service provider can be configured using either metadata importing or spSetting
|
|
@@ -26,10 +25,11 @@ export declare class ServiceProvider extends Entity {
|
|
|
26
25
|
* @param {function} customTagReplacement used when developers have their own login response template
|
|
27
26
|
*/
|
|
28
27
|
createLoginRequest(idp: IdentityProvider, binding?: string, customTagReplacement?: (template: string) => BindingContext): BindingContext | PostBindingContext | SimpleSignBindingContext;
|
|
29
|
-
|
|
28
|
+
createArtifactResolveRequest(idp: IdentityProvider, artifact: string): import("./binding-artifact.js").ArtifactResolveContext;
|
|
29
|
+
createArtifactResolveResponse(idp: IdentityProvider, config?: {
|
|
30
|
+
samlMessage?: string;
|
|
30
31
|
customTagReplacement?: (template: string) => BindingContext;
|
|
31
32
|
inResponseTo?: string;
|
|
32
|
-
relayState?: string;
|
|
33
33
|
}): Promise<BindingContext>;
|
|
34
34
|
/**
|
|
35
35
|
* @desc Validation of the parsed the URL parameters
|
|
@@ -37,19 +37,18 @@ export declare class ServiceProvider extends Entity {
|
|
|
37
37
|
* @param {string} binding protocol binding
|
|
38
38
|
* @param {request} req request
|
|
39
39
|
*/
|
|
40
|
-
parseLoginResponse(idp: any, binding: any, request: ESamlHttpRequest): Promise<FlowResult>;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
parseLoginResponseResolve(idp: IdentityProvider, art: string, request: ESamlHttpRequest): Promise<any>;
|
|
40
|
+
parseLoginResponse(idp: any, binding: any, request: ESamlHttpRequest): Promise<import("./flow.js").FlowResult>;
|
|
41
|
+
parseArtifactResolveRequest(idp: IdentityProvider, xml: string): Promise<{
|
|
42
|
+
soapContent: string;
|
|
43
|
+
samlContent: string;
|
|
44
|
+
extract: any;
|
|
45
|
+
artifact: any;
|
|
46
|
+
artifactData: import("./artifact.js").ParsedArtifact;
|
|
47
|
+
}>;
|
|
48
|
+
parseArtifactResolveResponse(idp: IdentityProvider, xml: string, inResponseTo?: string): Promise<{
|
|
49
|
+
soapContent: string;
|
|
50
|
+
samlContent: string;
|
|
51
|
+
extract: any;
|
|
52
|
+
}>;
|
|
54
53
|
}
|
|
55
54
|
//# sourceMappingURL=entity-sp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-sp.d.ts","sourceRoot":"","sources":["../../src/entity-sp.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,wBAAwB,EACzB,MAAM,aAAa,CAAC;AACrB,O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BAAgB,EAAE,GAAG,EAAE,MAAM;;;;;;;IAQ9D,4BAA4B,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;;;;;CAS9F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractor.d.ts","sourceRoot":"","sources":["../../src/extractor.ts"],"names":[],"mappings":"AAMA,UAAU,cAAc;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,EAAE,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;IAEnC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAOD,MAAM,MAAM,eAAe,GAAG,cAAc,EAAE,CAAC;AA4B/C,eAAO,MAAM,kBAAkB,EAAE,eAsFhC,CAAC;AAKF,eAAO,MAAM,qBAAqB,EAAE,eAsBnC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,
|
|
1
|
+
{"version":3,"file":"extractor.d.ts","sourceRoot":"","sources":["../../src/extractor.ts"],"names":[],"mappings":"AAMA,UAAU,cAAc;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,EAAE,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,OAAO,CAAC,EAAE,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Ae,CAAC,OAAO,EAAE,MAAM,OAE9C;AACD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,OAErD"}
|
package/types/src/flow.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../../src/flow.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../../src/flow.ts"],"names":[],"mappings":"AAqBA,MAAM,WAAW,UAAU;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,GAAG,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAosBD,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CA8BhG;AAED,wBAAgB,IAAI,CAAC,OAAO,KAAA,GAAG,OAAO,CAAC,UAAU,CAAC,CA0BjD"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import { SignatureVerifierOptions } from
|
|
2
|
-
|
|
1
|
+
import { SignatureVerifierOptions } from './libsaml.js';
|
|
2
|
+
export interface VerifiedSoapMessage {
|
|
3
|
+
verified: boolean;
|
|
4
|
+
soapContent: string;
|
|
5
|
+
message: string;
|
|
6
|
+
type: 'ArtifactResolve' | 'ArtifactResponse';
|
|
7
|
+
resolvedMessage: string | null;
|
|
8
|
+
}
|
|
9
|
+
declare function verifyAndDecryptSoapMessage(xml: string, opts: SignatureVerifierOptions): Promise<VerifiedSoapMessage>;
|
|
3
10
|
declare const _default: {
|
|
4
11
|
verifyAndDecryptSoapMessage: typeof verifyAndDecryptSoapMessage;
|
|
5
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libsamlSoap.d.ts","sourceRoot":"","sources":["../../src/libsamlSoap.ts"],"names":[],"mappings":"AAKA,OAAgB,
|
|
1
|
+
{"version":3,"file":"libsamlSoap.d.ts","sourceRoot":"","sources":["../../src/libsamlSoap.ts"],"names":[],"mappings":"AAKA,OAAgB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAiBjE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,iBAAiB,GAAG,kBAAkB,CAAC;IAC7C,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AA6FD,iBAAe,2BAA2B,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAiCpH;;;;AAED,wBAEE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/metadata.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,MAAM,CAAC;IAC1B,cAAc,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,WAAW,EAAE,MAAM,MAAM,CAAC;IAC1B,kBAAkB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5D,eAAe,EAAE,MAAM,GAAG,EAAE,CAAC;IAC7B,sBAAsB,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,KAAK,MAAM,GAAG,MAAM,CAAC;IACzE,4BAA4B,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,KAAK,MAAM,GAAG,MAAM,CAAC;IAC/E,kBAAkB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,MAAM,EAAE,CAAC;CACtD;AAED,MAAM,CAAC,OAAO,OAAO,QAAS,YAAW,iBAAiB;IAExD,SAAS,EAAE,MA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AAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM;IAe3E;;;;OAIG;IACI,4BAA4B,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM;IAejF;;;;OAIG;IACI,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;CAUxD"}
|
package/types/src/soap.d.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import { IdentityProviderConstructor as IdentityProvider, ServiceProviderConstructor as ServiceProvider } from
|
|
2
|
-
export declare function sendArtifactResolve(url: string, soapRequest:
|
|
3
|
-
export declare function sendArtifactResponse(url: string, soapRequest:
|
|
4
|
-
/**
|
|
5
|
-
* @desc generate Art id
|
|
6
|
-
*
|
|
7
|
-
* @param entityIDString
|
|
8
|
-
* @param endpointIndex
|
|
9
|
-
*/
|
|
1
|
+
import { IdentityProviderConstructor as IdentityProvider, ServiceProviderConstructor as ServiceProvider } from './types.js';
|
|
2
|
+
export declare function sendArtifactResolve(url: string, soapRequest: string): Promise<any>;
|
|
3
|
+
export declare function sendArtifactResponse(url: string, soapRequest: string): Promise<any>;
|
|
10
4
|
export declare function createArt(entityIDString: string | IdentityProvider | ServiceProvider, endpointIndex?: number): {
|
|
11
5
|
artifact: string;
|
|
12
6
|
origin: {
|
|
@@ -16,20 +10,6 @@ export declare function createArt(entityIDString: string | IdentityProvider | Se
|
|
|
16
10
|
messageHandle: string;
|
|
17
11
|
};
|
|
18
12
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
* @param artifact
|
|
22
|
-
*/
|
|
23
|
-
export declare function parseArt(artifact: string): {
|
|
24
|
-
typeCode: number;
|
|
25
|
-
endpointIndex: number;
|
|
26
|
-
sourceId: string;
|
|
27
|
-
messageHandle: string;
|
|
28
|
-
} | undefined;
|
|
29
|
-
/**
|
|
30
|
-
* 将对象转换为 ISO-8859-1 编码的 XML 字符串
|
|
31
|
-
* @param {Object} data - 要转换的数据对象
|
|
32
|
-
* @returns {Buffer} - ISO-8859-1 编码的 XML 数据 (Buffer)
|
|
33
|
-
*/
|
|
34
|
-
export declare function encodeXmlToIso88591(data: any): Buffer<ArrayBufferLike>;
|
|
13
|
+
export declare function parseArt(artifact: string): import("./artifact.js").ParsedArtifact;
|
|
14
|
+
export declare function encodeXmlToIso88591(data: unknown): Buffer<ArrayBufferLike>;
|
|
35
15
|
//# sourceMappingURL=soap.d.ts.map
|
package/types/src/soap.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"soap.d.ts","sourceRoot":"","sources":["../../src/soap.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"soap.d.ts","sourceRoot":"","sources":["../../src/soap.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,2BAA2B,IAAI,gBAAgB,EAC/C,0BAA0B,IAAI,eAAe,EAC9C,MAAM,YAAY,CAAC;AA8BpB,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,gBAEzE;AAED,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,gBAE1E;AAED,wBAAgB,SAAS,CACvB,cAAc,EAAE,MAAM,GAAG,gBAAgB,GAAG,eAAe,EAC3D,aAAa,SAAI;;;;;;;;EAiBlB;AAED,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,0CAExC;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,2BAiBhD"}
|
package/types/src/types.d.ts
CHANGED