samlesa 2.13.0 → 2.14.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.

Potentially problematic release.


This version of samlesa might be problematic. Click here for more details.

Files changed (149) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +36 -65
  3. package/build/.idea/deployment.xml +14 -0
  4. package/{src → build}/.idea/modules.xml +1 -1
  5. package/build/.idea/workspace.xml +57 -0
  6. package/build/index.js +18 -54
  7. package/build/index.js.map +1 -1
  8. package/build/src/api.js +18 -24
  9. package/build/src/api.js.map +1 -1
  10. package/build/src/binding-post.js +337 -365
  11. package/build/src/binding-post.js.map +1 -1
  12. package/build/src/binding-redirect.js +312 -340
  13. package/build/src/binding-redirect.js.map +1 -1
  14. package/build/src/binding-simplesign.js +201 -229
  15. package/build/src/binding-simplesign.js.map +1 -1
  16. package/build/src/entity-idp.js +119 -127
  17. package/build/src/entity-idp.js.map +1 -1
  18. package/build/src/entity-sp.js +88 -96
  19. package/build/src/entity-sp.js.map +1 -1
  20. package/build/src/entity.js +193 -225
  21. package/build/src/entity.js.map +1 -1
  22. package/build/src/extractor.js +361 -369
  23. package/build/src/extractor.js.map +1 -1
  24. package/build/src/flow.js +313 -320
  25. package/build/src/flow.js.map +1 -1
  26. package/build/src/libsaml.js +693 -721
  27. package/build/src/libsaml.js.map +1 -1
  28. package/build/src/metadata-idp.js +119 -127
  29. package/build/src/metadata-idp.js.map +1 -1
  30. package/build/src/metadata-sp.js +223 -231
  31. package/build/src/metadata-sp.js.map +1 -1
  32. package/build/src/metadata.js +138 -166
  33. package/build/src/metadata.js.map +1 -1
  34. package/build/src/types.js +4 -11
  35. package/build/src/types.js.map +1 -1
  36. package/build/src/urn.js +204 -212
  37. package/build/src/urn.js.map +1 -1
  38. package/build/src/utility.js +277 -292
  39. package/build/src/utility.js.map +1 -1
  40. package/build/src/validator.js +24 -27
  41. package/build/src/validator.js.map +1 -1
  42. package/package.json +19 -14
  43. package/types/api.d.ts +15 -0
  44. package/types/api.d.ts.map +1 -0
  45. package/types/binding-post.d.ts +48 -0
  46. package/types/binding-post.d.ts.map +1 -0
  47. package/types/binding-redirect.d.ts +54 -0
  48. package/types/binding-redirect.d.ts.map +1 -0
  49. package/types/binding-simplesign.d.ts +41 -0
  50. package/types/binding-simplesign.d.ts.map +1 -0
  51. package/types/entity-idp.d.ts +38 -0
  52. package/types/entity-idp.d.ts.map +1 -0
  53. package/types/entity-sp.d.ts +38 -0
  54. package/types/entity-sp.d.ts.map +1 -0
  55. package/types/entity.d.ts +100 -0
  56. package/types/entity.d.ts.map +1 -0
  57. package/types/extractor.d.ts +26 -0
  58. package/types/extractor.d.ts.map +1 -0
  59. package/types/flow.d.ts +7 -0
  60. package/types/flow.d.ts.map +1 -0
  61. package/types/index.d.ts +11 -10
  62. package/types/index.d.ts.map +1 -0
  63. package/types/libsaml.d.ts +208 -0
  64. package/types/libsaml.d.ts.map +1 -0
  65. package/types/metadata-idp.d.ts +25 -0
  66. package/types/metadata-idp.d.ts.map +1 -0
  67. package/types/metadata-sp.d.ts +37 -0
  68. package/types/metadata-sp.d.ts.map +1 -0
  69. package/types/metadata.d.ts +58 -0
  70. package/types/metadata.d.ts.map +1 -0
  71. package/types/src/api.d.ts +15 -13
  72. package/types/src/api.d.ts.map +1 -0
  73. package/types/src/binding-post.d.ts +48 -47
  74. package/types/src/binding-post.d.ts.map +1 -0
  75. package/types/src/binding-redirect.d.ts +54 -53
  76. package/types/src/binding-redirect.d.ts.map +1 -0
  77. package/types/src/binding-simplesign.d.ts +41 -40
  78. package/types/src/binding-simplesign.d.ts.map +1 -0
  79. package/types/src/entity-idp.d.ts +38 -37
  80. package/types/src/entity-idp.d.ts.map +1 -0
  81. package/types/src/entity-sp.d.ts +38 -36
  82. package/types/src/entity-sp.d.ts.map +1 -0
  83. package/types/src/entity.d.ts +100 -101
  84. package/types/src/entity.d.ts.map +1 -0
  85. package/types/src/extractor.d.ts +26 -25
  86. package/types/src/extractor.d.ts.map +1 -0
  87. package/types/src/flow.d.ts +7 -6
  88. package/types/src/flow.d.ts.map +1 -0
  89. package/types/src/libsaml.d.ts +208 -209
  90. package/types/src/libsaml.d.ts.map +1 -0
  91. package/types/src/metadata-idp.d.ts +25 -24
  92. package/types/src/metadata-idp.d.ts.map +1 -0
  93. package/types/src/metadata-sp.d.ts +37 -36
  94. package/types/src/metadata-sp.d.ts.map +1 -0
  95. package/types/src/metadata.d.ts +58 -59
  96. package/types/src/metadata.d.ts.map +1 -0
  97. package/types/src/types.d.ts +128 -129
  98. package/types/src/types.d.ts.map +1 -0
  99. package/types/src/urn.d.ts +195 -194
  100. package/types/src/urn.d.ts.map +1 -0
  101. package/types/src/utility.d.ts +133 -134
  102. package/types/src/utility.d.ts.map +1 -0
  103. package/types/src/validator.d.ts +4 -3
  104. package/types/src/validator.d.ts.map +1 -0
  105. package/types/types.d.ts +128 -0
  106. package/types/types.d.ts.map +1 -0
  107. package/types/urn.d.ts +195 -0
  108. package/types/urn.d.ts.map +1 -0
  109. package/types/utility.d.ts +133 -0
  110. package/types/utility.d.ts.map +1 -0
  111. package/types/validator.d.ts +4 -0
  112. package/types/validator.d.ts.map +1 -0
  113. package/.editorconfig +0 -19
  114. package/.github/FUNDING.yml +0 -1
  115. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  116. package/.idea/modules.xml +0 -8
  117. package/.idea/vcs.xml +0 -6
  118. package/.pre-commit.sh +0 -15
  119. package/.snyk +0 -8
  120. package/.travis.yml +0 -29
  121. package/Makefile +0 -25
  122. package/index.d.ts +0 -10
  123. package/index.js +0 -19
  124. package/index.js.map +0 -1
  125. package/index.ts +0 -28
  126. package/qodana.yaml +0 -29
  127. package/src/.idea/src.iml +0 -12
  128. package/src/.idea/vcs.xml +0 -6
  129. package/src/api.ts +0 -36
  130. package/src/binding-post.ts +0 -348
  131. package/src/binding-redirect.ts +0 -356
  132. package/src/binding-simplesign.ts +0 -238
  133. package/src/entity-idp.ts +0 -153
  134. package/src/entity-sp.ts +0 -114
  135. package/src/entity.ts +0 -243
  136. package/src/extractor.ts +0 -392
  137. package/src/flow.ts +0 -467
  138. package/src/libsaml.ts +0 -895
  139. package/src/metadata-idp.ts +0 -146
  140. package/src/metadata-sp.ts +0 -268
  141. package/src/metadata.ts +0 -166
  142. package/src/types.ts +0 -153
  143. package/src/urn.ts +0 -211
  144. package/src/utility.ts +0 -319
  145. package/src/validator.ts +0 -39
  146. package/tsconfig.json +0 -38
  147. package/tslint.json +0 -35
  148. package/types.d.ts +0 -2
  149. /package/{.idea/samlify.iml → build/.idea/build.iml} +0 -0
@@ -0,0 +1,133 @@
1
+ /**
2
+ * @file utility.ts
3
+ * @author tngan
4
+ * @desc Library for some common functions (e.g. de/inflation, en/decoding)
5
+ */
6
+ /**
7
+ * @desc Mimic lodash.zipObject
8
+ * @param arr1 {string[]}
9
+ * @param arr2 {[]}
10
+ */
11
+ export declare function zipObject(arr1: string[], arr2: any[], skipDuplicated?: boolean): {};
12
+ /**
13
+ * @desc Alternative to lodash.flattenDeep
14
+ * @reference https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_flattendeep
15
+ * @param input {[]}
16
+ */
17
+ export declare function flattenDeep(input: any[]): any;
18
+ /**
19
+ * @desc Alternative to lodash.last
20
+ * @reference https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_last
21
+ * @param input {[]}
22
+ */
23
+ export declare function last(input: any[]): any;
24
+ /**
25
+ * @desc Alternative to lodash.uniq
26
+ * @reference https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_uniq
27
+ * @param input {string[]}
28
+ */
29
+ export declare function uniq(input: string[]): string[];
30
+ /**
31
+ * @desc Alternative to lodash.get
32
+ * @reference https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_get
33
+ * @param obj
34
+ * @param path
35
+ * @param defaultValue
36
+ */
37
+ export declare function get(obj: any, path: any, defaultValue: any): any;
38
+ /**
39
+ * @desc Check if the input is string
40
+ * @param {any} input
41
+ */
42
+ export declare function isString(input: any): input is string;
43
+ /**
44
+ * @desc Encode string with base64 format
45
+ * @param {string} message plain-text message
46
+ * @return {string} base64 encoded string
47
+ */
48
+ declare function base64Encode(message: string | number[]): string;
49
+ /**
50
+ * @desc Decode string from base64 format
51
+ * @param {string} base64Message encoded string
52
+ * @param {boolean} isBytes determine the return value type (True: bytes False: string)
53
+ * @return {bytes/string} decoded bytes/string depends on isBytes, default is {string}
54
+ */
55
+ export declare function base64Decode(base64Message: string, isBytes?: boolean): string | Buffer;
56
+ /**
57
+ * @desc Compress the string
58
+ * @param {string} message
59
+ * @return {string} compressed string
60
+ */
61
+ declare function deflateString(message: string): number[];
62
+ /**
63
+ * @desc Decompress the compressed string
64
+ * @param {string} compressedString
65
+ * @return {string} decompressed string
66
+ */
67
+ export declare function inflateString(compressedString: string): string;
68
+ /**
69
+ * @desc Parse the .cer to string format without line break, header and footer
70
+ * @param {string} certString declares the certificate contents
71
+ * @return {string} certificiate in string format
72
+ */
73
+ declare function normalizeCerString(certString: string | Buffer): string;
74
+ /**
75
+ * @desc Normalize the string in .pem format without line break, header and footer
76
+ * @param {string} pemString
77
+ * @return {string} private key in string format
78
+ */
79
+ declare function normalizePemString(pemString: string | Buffer): string;
80
+ /**
81
+ * @desc Return the complete URL
82
+ * @param {object} req HTTP request
83
+ * @return {string} URL
84
+ */
85
+ declare function getFullURL(req: any): string;
86
+ /**
87
+ * @desc Parse input string, return default value if it is undefined
88
+ * @param {string/boolean}
89
+ * @return {boolean}
90
+ */
91
+ declare function parseString(str: any, defaultValue?: string): any;
92
+ /**
93
+ * @desc Override the object by another object (rtl)
94
+ * @param {object} default object
95
+ * @param {object} object applied to the default object
96
+ * @return {object} result object
97
+ */
98
+ declare function applyDefault(obj1: any, obj2: any): any;
99
+ /**
100
+ * @desc Get public key in pem format from the certificate included in the metadata
101
+ * @param {string} x509 certificate
102
+ * @return {string} public key fetched from the certificate
103
+ */
104
+ declare function getPublicKeyPemFromCertificate(x509CertificateString: string): string | Buffer<ArrayBufferLike>;
105
+ export declare function readPrivateKey(keyString: string | Buffer, passphrase?: string, isOutputString?: boolean): string | Buffer;
106
+ /**
107
+ * @desc Inline syntax sugar
108
+ */
109
+ declare function convertToString(input: any, isOutputString: any): any;
110
+ /**
111
+ * @desc Check if the input is an array with non-zero size
112
+ */
113
+ export declare function isNonEmptyArray(a: any): boolean;
114
+ export declare function castArrayOpt<T>(a?: T | T[]): T[];
115
+ export declare function notEmpty<TValue>(value: TValue | null | undefined): value is TValue;
116
+ declare const utility: {
117
+ isString: typeof isString;
118
+ base64Encode: typeof base64Encode;
119
+ base64Decode: typeof base64Decode;
120
+ deflateString: typeof deflateString;
121
+ inflateString: typeof inflateString;
122
+ normalizeCerString: typeof normalizeCerString;
123
+ normalizePemString: typeof normalizePemString;
124
+ getFullURL: typeof getFullURL;
125
+ parseString: typeof parseString;
126
+ applyDefault: typeof applyDefault;
127
+ getPublicKeyPemFromCertificate: typeof getPublicKeyPemFromCertificate;
128
+ readPrivateKey: typeof readPrivateKey;
129
+ convertToString: typeof convertToString;
130
+ isNonEmptyArray: typeof isNonEmptyArray;
131
+ };
132
+ export default utility;
133
+ //# sourceMappingURL=utility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../src/utility.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,cAAc,UAAO,MAmB3E;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,OAIvC;AAED;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,OAEhC;AAED;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,YAGnC;AAED;;;;;;GAMG;AACH,wBAAgB,GAAG,CAAC,GAAG,KAAA,EAAE,IAAI,KAAA,EAAE,YAAY,KAAA,OAG1C;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,GAAG,mBAElC;AAED;;;;GAIG;AACH,iBAAS,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,UAE/C;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAGtF;AAED;;;;GAIG;AACH,iBAAS,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAGhD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAM9D;AAYD;;;;GAIG;AACH,iBAAS,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,UAEtD;AAED;;;;GAIG;AACH,iBAAS,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,UAErD;AAED;;;;GAIG;AACH,iBAAS,UAAU,CAAC,GAAG,KAAA,UAEtB;AAED;;;;GAIG;AACH,iBAAS,WAAW,CAAC,GAAG,KAAA,EAAE,YAAY,SAAK,OAE1C;AAED;;;;;GAKG;AACH,iBAAS,YAAY,CAAC,IAAI,KAAA,EAAE,IAAI,KAAA,OAE/B;AAED;;;;GAIG;AACH,iBAAS,8BAA8B,CAAC,qBAAqB,EAAE,MAAM,oCAWpE;AAqCD,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,GAAG,MAAM,EAC1B,UAAU,CAAC,EAAE,MAAM,EACnB,cAAc,GAAE,OAAc,GAC7B,MAAM,GAAG,MAAM,CA8BjB;AAGD;;GAEG;AACH,iBAAS,eAAe,CAAC,KAAK,KAAA,EAAE,cAAc,KAAA,OAE7C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,GAAG,WAErC;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,CAGhD;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,IAAI,MAAM,CAElF;AAED,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;CAeZ,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ type DriftTolerance = [number, number];
2
+ declare function verifyTime(utcNotBefore: string | undefined, utcNotOnOrAfter: string | undefined, drift?: DriftTolerance): boolean;
3
+ export { verifyTime };
4
+ //# sourceMappingURL=validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../src/validator.ts"],"names":[],"mappings":"AACA,KAAK,cAAc,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEvC,iBAAS,UAAU,CACjB,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,KAAK,GAAE,cAAuB,GAC7B,OAAO,CA2BT;AAED,OAAO,EACL,UAAU,EACX,CAAC"}
package/.editorconfig DELETED
@@ -1,19 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- indent_style = tab
5
- end_of_line = lf
6
- charset = utf-8
7
- trim_trailing_whitespace = true
8
- insert_final_newline = true
9
-
10
- [*.{json,js,ts,jsx,html,css}]
11
- indent_style = space
12
- indent_size = 2
13
-
14
- [.eslintrc]
15
- indent_style = space
16
- indent_size = 2
17
-
18
- [*.md]
19
- trim_trailing_whitespace = false
@@ -1 +0,0 @@
1
- github: [tngan]
@@ -1,6 +0,0 @@
1
- <component name="InspectionProjectProfileManager">
2
- <profile version="1.0">
3
- <option name="myName" value="Project Default" />
4
- <inspection_tool class="TsLint" enabled="true" level="WARNING" enabled_by_default="true" />
5
- </profile>
6
- </component>
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/samlify.iml" filepath="$PROJECT_DIR$/.idea/samlify.iml" />
6
- </modules>
7
- </component>
8
- </project>
package/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="" vcs="Git" />
5
- </component>
6
- </project>
package/.pre-commit.sh DELETED
@@ -1,15 +0,0 @@
1
- echo "Linting"
2
- npm run lint
3
- LINTRESULT=$?
4
-
5
- echo "Compiling"
6
- $(npm bin)/tsc
7
- BUILDRESULT=$?
8
-
9
- if [[ $LINTRESULT -ne 0 || $BUILDRESULT -ne 0 ]]; then
10
- echo "Fix errors before commit"
11
- exit 1
12
- else
13
- echo "Ok to commit"
14
- exit 0
15
- fi
package/.snyk DELETED
@@ -1,8 +0,0 @@
1
- # Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
2
- version: v1.14.0
3
- ignore: {}
4
- # patches apply the minimum changes required to fix a vulnerability
5
- patch:
6
- SNYK-JS-LODASH-450202:
7
- - '@authenio/xml-encryption > async > lodash':
8
- patched: '2019-12-11T18:53:51.541Z'
package/.travis.yml DELETED
@@ -1,29 +0,0 @@
1
- language: node_js
2
-
3
- node_js:
4
- - "16"
5
- - "18"
6
- - "20"
7
-
8
- env:
9
- - INSTALL_JDK=1
10
- - INSTALL_JDK=0
11
-
12
- before_install:
13
- - if [[ "$INSTALL_JDK" == "1" ]] ; then make install_jdk ; fi
14
-
15
- install:
16
- - yarn install --production=true
17
-
18
- script:
19
- - yarn add @authenio/samlify-xsd-schema-validator
20
- - yarn test --timeout=30s
21
-
22
- branches:
23
- only:
24
- - master
25
- - /^.*-alpha$/
26
- - /^.*-rc.*$/
27
- - /^feature\/.*$/
28
-
29
- after_success: npm run coverage
package/Makefile DELETED
@@ -1,25 +0,0 @@
1
- PROJECT = "samlify"
2
-
3
- install: ;@echo "install ${PROJECT}"; \
4
- npm install;
5
-
6
- clean: ;
7
- rm -rf node_modules
8
-
9
- rebuild: ;
10
- rm -rf build; \
11
- tsc; \
12
-
13
- pretest: ;
14
- mkdir -p build/test; \
15
- cp -a test/key test/misc build/test;
16
-
17
- install_jdk:
18
- sudo add-apt-repository ppa:openjdk-r/ppa -y
19
- sudo apt-get -qq update
20
- sudo apt-get install -y openjdk-9-jdk
21
-
22
- doc: ;@echo "prepare and serve the docs"; \
23
- docsify serve ./docs
24
-
25
- .PHONY: rebuild pretest doc install_jdk
package/index.d.ts DELETED
@@ -1,10 +0,0 @@
1
- import IdentityProvider, { IdentityProvider as IdentityProviderInstance } from './src/entity-idp';
2
- import ServiceProvider, { ServiceProvider as ServiceProviderInstance } from './src/entity-sp';
3
- export { default as IdPMetadata } from './src/metadata-idp';
4
- export { default as SPMetadata } from './src/metadata-sp';
5
- export { default as Utility } from './src/utility';
6
- export { default as SamlLib } from './src/libsaml';
7
- import * as Constants from './src/urn';
8
- import * as Extractor from './src/extractor';
9
- import { setSchemaValidator, setDOMParserOptions } from './src/api';
10
- export { Constants, Extractor, IdentityProvider, IdentityProviderInstance, ServiceProvider, ServiceProviderInstance, setSchemaValidator, setDOMParserOptions };
package/index.js DELETED
@@ -1,19 +0,0 @@
1
- // version <= 1.25
2
- import IdentityProvider, { IdentityProvider as IdentityProviderInstance } from './src/entity-idp';
3
- import ServiceProvider, { ServiceProvider as ServiceProviderInstance } from './src/entity-sp';
4
- export { default as IdPMetadata } from './src/metadata-idp';
5
- export { default as SPMetadata } from './src/metadata-sp';
6
- export { default as Utility } from './src/utility';
7
- export { default as SamlLib } from './src/libsaml';
8
- // roadmap
9
- // new name convention in version >= 3.0
10
- import * as Constants from './src/urn';
11
- import * as Extractor from './src/extractor';
12
- // exposed methods for customizing samlify
13
- import { setSchemaValidator, setDOMParserOptions } from './src/api';
14
- export { Constants, Extractor,
15
- // temp: resolve the conflict after version >= 3.0
16
- IdentityProvider, IdentityProviderInstance, ServiceProvider, ServiceProviderInstance,
17
- // set context
18
- setSchemaValidator, setDOMParserOptions };
19
- //# sourceMappingURL=index.js.map
package/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAClB,OAAO,gBAAgB,EAAE,EAAE,gBAAgB,IAAI,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAClG,OAAO,eAAe,EAAE,EAAE,eAAe,IAAI,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE9F,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAC;AACnD,UAAU;AACV,wCAAwC;AACxC,OAAO,KAAK,SAAS,MAAM,WAAW,CAAC;AACvC,OAAO,KAAK,SAAS,MAAM,iBAAiB,CAAC;AAE7C,0CAA0C;AAC1C,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEpE,OAAO,EACL,SAAS,EACT,SAAS;AACT,kDAAkD;AAClD,gBAAgB,EAChB,wBAAwB,EACxB,eAAe,EACf,uBAAuB;AACvB,cAAc;AACd,kBAAkB,EAClB,mBAAmB,EACpB,CAAC"}
package/index.ts DELETED
@@ -1,28 +0,0 @@
1
- // version <= 1.25
2
- import IdentityProvider, { IdentityProvider as IdentityProviderInstance } from './src/entity-idp.js';
3
- import ServiceProvider, { ServiceProvider as ServiceProviderInstance } from './src/entity-sp.js';
4
-
5
- export { default as IdPMetadata } from './src/metadata-idp.js';
6
- export { default as SPMetadata } from './src/metadata-sp.js';
7
- export { default as Utility } from './src/utility.js';
8
- export { default as SamlLib } from './src/libsaml.js';
9
- // roadmap
10
- // new name convention in version >= 3.0
11
- import * as Constants from './src/urn.js';
12
- import * as Extractor from './src/extractor.js';
13
-
14
- // exposed methods for customizing samlify
15
- import { setSchemaValidator, setDOMParserOptions } from './src/api.js';
16
-
17
- export {
18
- Constants,
19
- Extractor,
20
- // temp: resolve the conflict after version >= 3.0
21
- IdentityProvider,
22
- IdentityProviderInstance,
23
- ServiceProvider,
24
- ServiceProviderInstance,
25
- // set context
26
- setSchemaValidator,
27
- setDOMParserOptions
28
- };
package/qodana.yaml DELETED
@@ -1,29 +0,0 @@
1
- #-------------------------------------------------------------------------------#
2
- # Qodana analysis is configured by qodana.yaml file #
3
- # https://www.jetbrains.com/help/qodana/qodana-yaml.html #
4
- #-------------------------------------------------------------------------------#
5
- version: "1.0"
6
-
7
- #Specify inspection profile for code analysis
8
- profile:
9
- name: qodana.starter
10
-
11
- #Enable inspections
12
- #include:
13
- # - name: <SomeEnabledInspectionId>
14
-
15
- #Disable inspections
16
- #exclude:
17
- # - name: <SomeDisabledInspectionId>
18
- # paths:
19
- # - <path/where/not/run/inspection>
20
-
21
- #Execute shell command before Qodana execution (Applied in CI/CD pipeline)
22
- #bootstrap: sh ./prepare-qodana.sh
23
-
24
- #Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
25
- #plugins:
26
- # - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)
27
-
28
- #Specify Qodana linter for analysis (Applied in CI/CD pipeline)
29
- linter: jetbrains/qodana-js:2025.1
package/src/.idea/src.iml DELETED
@@ -1,12 +0,0 @@
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>
package/src/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
5
- </component>
6
- </project>
package/src/api.ts DELETED
@@ -1,36 +0,0 @@
1
- import { DOMParser as dom, Options as DOMParserOptions } from '@xmldom/xmldom';
2
-
3
- // global module configuration
4
- interface Context extends ValidatorContext, DOMParserContext {}
5
-
6
- interface ValidatorContext {
7
- validate?: (xml: string) => Promise<any>;
8
- }
9
-
10
- interface DOMParserContext {
11
- dom: dom;
12
- }
13
-
14
- const context: Context = {
15
- validate: undefined,
16
- dom: new dom()
17
- };
18
-
19
- export function getContext() {
20
- return context;
21
- }
22
-
23
- export function setSchemaValidator(params: ValidatorContext) {
24
-
25
- if (typeof params.validate !== 'function') {
26
- throw new Error('validate must be a callback function having one argument as xml input');
27
- }
28
-
29
- // assign the validate function to the context
30
- context.validate = params.validate;
31
-
32
- }
33
-
34
- export function setDOMParserOptions(options: DOMParserOptions = {}) {
35
- context.dom = new dom(options);
36
- }