samlesa 2.12.3
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/.editorconfig +19 -0
- package/.github/FUNDING.yml +1 -0
- package/.idea/compiler.xml +6 -0
- package/.idea/deployment.xml +14 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/jsLibraryMappings.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/samlify.iml +12 -0
- package/.idea/vcs.xml +6 -0
- package/.pre-commit.sh +15 -0
- package/.snyk +8 -0
- package/.travis.yml +29 -0
- package/LICENSE +22 -0
- package/Makefile +25 -0
- package/README.md +84 -0
- package/build/.idea/workspace.xml +58 -0
- package/build/index.js +65 -0
- package/build/index.js.map +1 -0
- package/build/src/api.js +24 -0
- package/build/src/api.js.map +1 -0
- package/build/src/binding-post.js +369 -0
- package/build/src/binding-post.js.map +1 -0
- package/build/src/binding-redirect.js +333 -0
- package/build/src/binding-redirect.js.map +1 -0
- package/build/src/binding-simplesign.js +233 -0
- package/build/src/binding-simplesign.js.map +1 -0
- package/build/src/entity-idp.js +131 -0
- package/build/src/entity-idp.js.map +1 -0
- package/build/src/entity-sp.js +97 -0
- package/build/src/entity-sp.js.map +1 -0
- package/build/src/entity.js +236 -0
- package/build/src/entity.js.map +1 -0
- package/build/src/extractor.js +370 -0
- package/build/src/extractor.js.map +1 -0
- package/build/src/flow.js +320 -0
- package/build/src/flow.js.map +1 -0
- package/build/src/libsaml.js +642 -0
- package/build/src/libsaml.js.map +1 -0
- package/build/src/metadata-idp.js +128 -0
- package/build/src/metadata-idp.js.map +1 -0
- package/build/src/metadata-sp.js +232 -0
- package/build/src/metadata-sp.js.map +1 -0
- package/build/src/metadata.js +177 -0
- package/build/src/metadata.js.map +1 -0
- package/build/src/types.js +12 -0
- package/build/src/types.js.map +1 -0
- package/build/src/urn.js +213 -0
- package/build/src/urn.js.map +1 -0
- package/build/src/utility.js +249 -0
- package/build/src/utility.js.map +1 -0
- package/build/src/validator.js +27 -0
- package/build/src/validator.js.map +1 -0
- package/index.d.ts +10 -0
- package/index.js +19 -0
- package/index.js.map +1 -0
- package/index.ts +28 -0
- package/package.json +74 -0
- package/qodana.yaml +29 -0
- package/src/.idea/modules.xml +8 -0
- package/src/.idea/src.iml +12 -0
- package/src/.idea/vcs.xml +6 -0
- package/src/api.ts +36 -0
- package/src/binding-post.ts +338 -0
- package/src/binding-redirect.ts +331 -0
- package/src/binding-simplesign.ts +231 -0
- package/src/entity-idp.ts +145 -0
- package/src/entity-sp.ts +114 -0
- package/src/entity.ts +243 -0
- package/src/extractor.ts +392 -0
- package/src/flow.ts +467 -0
- package/src/libsaml.ts +786 -0
- package/src/metadata-idp.ts +146 -0
- package/src/metadata-sp.ts +268 -0
- package/src/metadata.ts +166 -0
- package/src/types.ts +153 -0
- package/src/urn.ts +211 -0
- package/src/utility.ts +248 -0
- package/src/validator.ts +44 -0
- package/tsconfig.json +38 -0
- package/tslint.json +35 -0
- package/types/index.d.ts +10 -0
- package/types/src/api.d.ts +13 -0
- package/types/src/binding-post.d.ts +46 -0
- package/types/src/binding-redirect.d.ts +52 -0
- package/types/src/binding-simplesign.d.ts +39 -0
- package/types/src/entity-idp.d.ts +42 -0
- package/types/src/entity-sp.d.ts +36 -0
- package/types/src/entity.d.ts +99 -0
- package/types/src/extractor.d.ts +25 -0
- package/types/src/flow.d.ts +6 -0
- package/types/src/libsaml.d.ts +210 -0
- package/types/src/metadata-idp.d.ts +24 -0
- package/types/src/metadata-sp.d.ts +36 -0
- package/types/src/metadata.d.ts +57 -0
- package/types/src/types.d.ts +127 -0
- package/types/src/urn.d.ts +194 -0
- package/types/src/utility.d.ts +134 -0
- package/types/src/validator.d.ts +3 -0
- package/types.d.ts +2 -0
package/.editorconfig
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
github: [tngan]
|
|
@@ -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>
|
|
@@ -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>
|
package/.idea/vcs.xml
ADDED
package/.pre-commit.sh
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
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/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2016-present Tony Ngan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
package/Makefile
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
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/README.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# samlify ·
|
|
2
|
+
|
|
3
|
+
[](https://app.circleci.com/pipelines/github/tngan/samlify)
|
|
4
|
+
[](https://www.npmjs.com/package/samlify)
|
|
5
|
+
[](https://www.npmjs.com/package/samlify)
|
|
6
|
+
[](https://coveralls.io/github/tngan/samlify?branch=master)
|
|
7
|
+
|
|
8
|
+
Highly configuarable Node.js SAML 2.0 library for Single Sign On
|
|
9
|
+
|
|
10
|
+
## 🔄 此仓库为 [samlify](https://github.com/tngan/samlify) 的维护分支,修复了以下问题
|
|
11
|
+
|
|
12
|
+
- 将依赖包 @authenio/xml-encryption 更换成 xml-encryption并升级了版本,xml-encryption最新版本添加对 sha256/512 加密密钥 OAEP 摘要方法的支持,并将默认密钥签名算法指定为 sha-512
|
|
13
|
+
- 修复了断言加密的一些错误 如libsaml.ts对加密断言仍然采用Assertion字段提取获取,增加了EncryptedAssertion字段提取逻辑
|
|
14
|
+
- 默认elementsOrder增加了 AttributeConsumingService,并在参数增加了 attributeConsumingService字段能够根据字段生成attributeElement包括attributeValue
|
|
15
|
+
- 默认替换增加了自定义函数模板 增加了对多值的attributeValue支持与替换
|
|
16
|
+
- 默认替签名算法替换为SHA-256及更高,加密算法为默认AES_256_GCM模式
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## Welcome PRs
|
|
20
|
+
|
|
21
|
+
Welcome all PRs for maintaining this project, or provide a link to the repositories especially for use cases alongside with different frameworks.
|
|
22
|
+
|
|
23
|
+
### Installation
|
|
24
|
+
|
|
25
|
+
Multiple schema validators are currently supported by our system, with couple validator modules available and the option to create custom ones. It is essential to utilize the setSchemaValidator function at the outset to avoid errors.
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import * as samlify from 'samlify';
|
|
29
|
+
import * as validator from '@authenio/samlify-xsd-schema-validator';
|
|
30
|
+
// import * as validator from '@authenio/samlify-validate-with-xmllint';
|
|
31
|
+
// import * as validator from '@authenio/samlify-node-xmllint';
|
|
32
|
+
|
|
33
|
+
samlify.setSchemaValidator(validator);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Now you can create your own schema validator and even suppress it but you have to take the risk for accepting malicious response.
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
samlify.setSchemaValidator({
|
|
40
|
+
validate: (response: string) => {
|
|
41
|
+
/* implment your own or always returns a resolved promise to skip */
|
|
42
|
+
return Promise.resolve('skipped');
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
For those using Windows, `windows-build-tools` should be installed globally before installing samlify if you are using `libxml` validator.
|
|
48
|
+
|
|
49
|
+
```console
|
|
50
|
+
yarn global add windows-build-tools
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Development
|
|
54
|
+
|
|
55
|
+
This project is now developed using TypeScript, also support Yarn which is a new package manager.
|
|
56
|
+
|
|
57
|
+
```console
|
|
58
|
+
yarn global add typescript
|
|
59
|
+
yarn
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Get Started
|
|
63
|
+
|
|
64
|
+
```javascript
|
|
65
|
+
const saml = require('samlify');
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
See full documentation [here](https://samlify.js.org/)
|
|
69
|
+
|
|
70
|
+
### Example
|
|
71
|
+
|
|
72
|
+
[react-samlify](https://github.com/passify/react-samlify) SP example powered by React, TypeScript and Webpack
|
|
73
|
+
|
|
74
|
+
### Talks
|
|
75
|
+
|
|
76
|
+
[An introduction to Single Sign On](http://www.slideshare.net/TonyNgan/an-introduction-of-single-sign-on)
|
|
77
|
+
|
|
78
|
+
### License
|
|
79
|
+
|
|
80
|
+
[MIT](LICENSE)
|
|
81
|
+
|
|
82
|
+
### Copyright
|
|
83
|
+
|
|
84
|
+
Copyright (C) 2016-present Tony Ngan, released under the MIT License.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="AutoImportSettings">
|
|
4
|
+
<option name="autoReloadType" value="SELECTIVE" />
|
|
5
|
+
</component>
|
|
6
|
+
<component name="ChangeListManager">
|
|
7
|
+
<list default="true" id="bd9fb792-e752-426e-b2f5-6b9b9086ce24" name="更改" comment="" />
|
|
8
|
+
<option name="SHOW_DIALOG" value="false" />
|
|
9
|
+
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
10
|
+
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
11
|
+
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
12
|
+
</component>
|
|
13
|
+
<component name="ProjectColorInfo">{
|
|
14
|
+
"customColor": "",
|
|
15
|
+
"associatedIndex": 8
|
|
16
|
+
}</component>
|
|
17
|
+
<component name="ProjectId" id="2x1xvhQuH75Qdyg5ofvvmYeuJj5" />
|
|
18
|
+
<component name="ProjectViewState">
|
|
19
|
+
<option name="hideEmptyMiddlePackages" value="true" />
|
|
20
|
+
<option name="showExcludedFiles" value="false" />
|
|
21
|
+
<option name="showLibraryContents" value="true" />
|
|
22
|
+
</component>
|
|
23
|
+
<component name="PropertiesComponent">{
|
|
24
|
+
"keyToString": {
|
|
25
|
+
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
|
26
|
+
"RunOnceActivity.ShowReadmeOnStart": "true",
|
|
27
|
+
"ignore.virus.scanning.warn.message": "true",
|
|
28
|
+
"node.js.detected.package.eslint": "true",
|
|
29
|
+
"node.js.detected.package.tslint": "true",
|
|
30
|
+
"node.js.selected.package.eslint": "(autodetect)",
|
|
31
|
+
"node.js.selected.package.tslint": "(autodetect)",
|
|
32
|
+
"nodejs_package_manager_path": "npm",
|
|
33
|
+
"ts.external.directory.path": "D:\\software\\WebStorm 2022.3.3\\plugins\\javascript-plugin\\jsLanguageServicesImpl\\external",
|
|
34
|
+
"vue.rearranger.settings.migration": "true"
|
|
35
|
+
}
|
|
36
|
+
}</component>
|
|
37
|
+
<component name="SharedIndexes">
|
|
38
|
+
<attachedChunks>
|
|
39
|
+
<set>
|
|
40
|
+
<option value="bundled-js-predefined-d6986cc7102b-f27c65a3e318-JavaScript-WS-251.23774.424" />
|
|
41
|
+
</set>
|
|
42
|
+
</attachedChunks>
|
|
43
|
+
</component>
|
|
44
|
+
<component name="TaskManager">
|
|
45
|
+
<task active="true" id="Default" summary="默认任务">
|
|
46
|
+
<changelist id="bd9fb792-e752-426e-b2f5-6b9b9086ce24" name="更改" comment="" />
|
|
47
|
+
<created>1747119613080</created>
|
|
48
|
+
<option name="number" value="Default" />
|
|
49
|
+
<option name="presentableId" value="Default" />
|
|
50
|
+
<updated>1747119613080</updated>
|
|
51
|
+
<workItem from="1747119614232" duration="2240000" />
|
|
52
|
+
</task>
|
|
53
|
+
<servers />
|
|
54
|
+
</component>
|
|
55
|
+
<component name="TypeScriptGeneratedFilesManager">
|
|
56
|
+
<option name="version" value="3" />
|
|
57
|
+
</component>
|
|
58
|
+
</project>
|
package/build/index.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.setDOMParserOptions = exports.setSchemaValidator = exports.ServiceProviderInstance = exports.ServiceProvider = exports.IdentityProviderInstance = exports.IdentityProvider = exports.Extractor = exports.Constants = exports.SamlLib = exports.Utility = exports.SPMetadata = exports.IdPMetadata = void 0;
|
|
40
|
+
// version <= 1.25
|
|
41
|
+
const entity_idp_js_1 = __importStar(require("./src/entity-idp.js"));
|
|
42
|
+
exports.IdentityProvider = entity_idp_js_1.default;
|
|
43
|
+
Object.defineProperty(exports, "IdentityProviderInstance", { enumerable: true, get: function () { return entity_idp_js_1.IdentityProvider; } });
|
|
44
|
+
const entity_sp_js_1 = __importStar(require("./src/entity-sp.js"));
|
|
45
|
+
exports.ServiceProvider = entity_sp_js_1.default;
|
|
46
|
+
Object.defineProperty(exports, "ServiceProviderInstance", { enumerable: true, get: function () { return entity_sp_js_1.ServiceProvider; } });
|
|
47
|
+
var metadata_idp_js_1 = require("./src/metadata-idp.js");
|
|
48
|
+
Object.defineProperty(exports, "IdPMetadata", { enumerable: true, get: function () { return __importDefault(metadata_idp_js_1).default; } });
|
|
49
|
+
var metadata_sp_js_1 = require("./src/metadata-sp.js");
|
|
50
|
+
Object.defineProperty(exports, "SPMetadata", { enumerable: true, get: function () { return __importDefault(metadata_sp_js_1).default; } });
|
|
51
|
+
var utility_js_1 = require("./src/utility.js");
|
|
52
|
+
Object.defineProperty(exports, "Utility", { enumerable: true, get: function () { return __importDefault(utility_js_1).default; } });
|
|
53
|
+
var libsaml_js_1 = require("./src/libsaml.js");
|
|
54
|
+
Object.defineProperty(exports, "SamlLib", { enumerable: true, get: function () { return __importDefault(libsaml_js_1).default; } });
|
|
55
|
+
// roadmap
|
|
56
|
+
// new name convention in version >= 3.0
|
|
57
|
+
const Constants = __importStar(require("./src/urn.js"));
|
|
58
|
+
exports.Constants = Constants;
|
|
59
|
+
const Extractor = __importStar(require("./src/extractor.js"));
|
|
60
|
+
exports.Extractor = Extractor;
|
|
61
|
+
// exposed methods for customizing samlify
|
|
62
|
+
const api_js_1 = require("./src/api.js");
|
|
63
|
+
Object.defineProperty(exports, "setSchemaValidator", { enumerable: true, get: function () { return api_js_1.setSchemaValidator; } });
|
|
64
|
+
Object.defineProperty(exports, "setDOMParserOptions", { enumerable: true, get: function () { return api_js_1.setDOMParserOptions; } });
|
|
65
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAAkB;AAClB,qEAAqG;AAmBnG,2BAnBK,uBAAgB,CAmBL;AAChB,yGApB6C,gCAAwB,OAoB7C;AAnB1B,mEAAiG;AAoB/F,0BApBK,sBAAe,CAoBL;AACf,wGArB2C,8BAAuB,OAqB3C;AAnBzB,yDAA+D;AAAtD,+HAAA,OAAO,OAAe;AAC/B,uDAA6D;AAApD,6HAAA,OAAO,OAAc;AAC9B,+CAAsD;AAA7C,sHAAA,OAAO,OAAW;AAC3B,+CAAsD;AAA7C,sHAAA,OAAO,OAAW;AAC3B,UAAU;AACV,wCAAwC;AACxC,wDAA0C;AAOxC,8BAAS;AANX,8DAAgD;AAO9C,8BAAS;AALX,0CAA0C;AAC1C,yCAAuE;AAWrE,mGAXO,2BAAkB,OAWP;AAClB,oGAZ2B,4BAAmB,OAY3B"}
|
package/build/src/api.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getContext = getContext;
|
|
4
|
+
exports.setSchemaValidator = setSchemaValidator;
|
|
5
|
+
exports.setDOMParserOptions = setDOMParserOptions;
|
|
6
|
+
const xmldom_1 = require("@xmldom/xmldom");
|
|
7
|
+
const context = {
|
|
8
|
+
validate: undefined,
|
|
9
|
+
dom: new xmldom_1.DOMParser()
|
|
10
|
+
};
|
|
11
|
+
function getContext() {
|
|
12
|
+
return context;
|
|
13
|
+
}
|
|
14
|
+
function setSchemaValidator(params) {
|
|
15
|
+
if (typeof params.validate !== 'function') {
|
|
16
|
+
throw new Error('validate must be a callback function having one argument as xml input');
|
|
17
|
+
}
|
|
18
|
+
// assign the validate function to the context
|
|
19
|
+
context.validate = params.validate;
|
|
20
|
+
}
|
|
21
|
+
function setDOMParserOptions(options = {}) {
|
|
22
|
+
context.dom = new xmldom_1.DOMParser(options);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":";;AAkBA,gCAEC;AAED,gDASC;AAED,kDAEC;AAnCD,2CAA+E;AAa/E,MAAM,OAAO,GAAY;IACvB,QAAQ,EAAE,SAAS;IACnB,GAAG,EAAE,IAAI,kBAAG,EAAE;CACf,CAAC;AAEF,SAAgB,UAAU;IACxB,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAgB,kBAAkB,CAAC,MAAwB;IAEzD,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC;QAC1C,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;IAC3F,CAAC;IAED,8CAA8C;IAC9C,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAErC,CAAC;AAED,SAAgB,mBAAmB,CAAC,UAA4B,EAAE;IAChE,OAAO,CAAC,GAAG,GAAG,IAAI,kBAAG,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC"}
|