samlesa 2.14.7 → 2.14.9
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.
- package/README.md +8 -7
- package/build/index.js +0 -1
- package/build/src/api.js +2 -2
- package/build/src/binding-post.js +0 -1
- package/build/src/binding-redirect.js +0 -1
- package/build/src/binding-simplesign.js +0 -1
- package/build/src/entity-idp.js +0 -1
- package/build/src/entity-sp.js +0 -1
- package/build/src/entity.js +0 -1
- package/build/src/extractor.js +0 -1
- package/build/src/flow.js +0 -1
- package/build/src/libsaml.js +0 -74
- package/build/src/metadata-idp.js +0 -1
- package/build/src/metadata-sp.js +0 -1
- package/build/src/metadata.js +0 -1
- package/build/src/schema/XMLSchema.dtd +402 -0
- package/build/src/schema/datatypes.dtd +203 -0
- package/build/src/schema/saml-schema-assertion-2.0.xsd +283 -0
- package/build/src/schema/saml-schema-authn-context-2.0.xsd +23 -0
- package/build/src/schema/saml-schema-authn-context-auth-telephony-2.0.xsd +81 -0
- package/build/src/schema/saml-schema-authn-context-ip-2.0.xsd +65 -0
- package/build/src/schema/saml-schema-authn-context-ippword-2.0.xsd +67 -0
- package/build/src/schema/saml-schema-authn-context-kerberos-2.0.xsd +83 -0
- package/build/src/schema/saml-schema-authn-context-mobileonefactor-reg-2.0.xsd +186 -0
- package/build/src/schema/saml-schema-authn-context-mobileonefactor-unreg-2.0.xsd +183 -0
- package/build/src/schema/saml-schema-authn-context-mobiletwofactor-reg-2.0.xsd +202 -0
- package/build/src/schema/saml-schema-authn-context-mobiletwofactor-unreg-2.0.xsd +200 -0
- package/build/src/schema/saml-schema-authn-context-nomad-telephony-2.0.xsd +81 -0
- package/build/src/schema/saml-schema-authn-context-personal-telephony-2.0.xsd +80 -0
- package/build/src/schema/saml-schema-authn-context-pgp-2.0.xsd +83 -0
- package/build/src/schema/saml-schema-authn-context-ppt-2.0.xsd +81 -0
- package/build/src/schema/saml-schema-authn-context-pword-2.0.xsd +64 -0
- package/build/src/schema/saml-schema-authn-context-session-2.0.xsd +64 -0
- package/build/src/schema/saml-schema-authn-context-smartcard-2.0.xsd +64 -0
- package/build/src/schema/saml-schema-authn-context-smartcardpki-2.0.xsd +129 -0
- package/build/src/schema/saml-schema-authn-context-softwarepki-2.0.xsd +129 -0
- package/build/src/schema/saml-schema-authn-context-spki-2.0.xsd +83 -0
- package/build/src/schema/saml-schema-authn-context-srp-2.0.xsd +82 -0
- package/build/src/schema/saml-schema-authn-context-sslcert-2.0.xsd +97 -0
- package/build/src/schema/saml-schema-authn-context-telephony-2.0.xsd +79 -0
- package/build/src/schema/saml-schema-authn-context-timesync-2.0.xsd +105 -0
- package/build/src/schema/saml-schema-authn-context-types-2.0.xsd +821 -0
- package/build/src/schema/saml-schema-authn-context-x509-2.0.xsd +83 -0
- package/build/src/schema/saml-schema-authn-context-xmldsig-2.0.xsd +83 -0
- package/build/src/schema/saml-schema-dce-2.0.xsd +29 -0
- package/build/src/schema/saml-schema-ecp-2.0.xsd +57 -0
- package/build/src/schema/saml-schema-metadata-2.0.xsd +337 -0
- package/build/src/schema/saml-schema-protocol-2.0.xsd +302 -0
- package/build/src/schema/saml-schema-x500-2.0.xsd +20 -0
- package/build/src/schema/saml-schema-xacml-2.0.xsd +19 -0
- package/build/src/schema/xenc-schema.xsd +145 -0
- package/build/src/schema/xmldsig-core-schema.xsd +317 -0
- package/build/src/schemaValidator.js +40 -0
- package/build/src/types.js +0 -1
- package/build/src/urn.js +0 -1
- package/build/src/utility.js +0 -1
- package/build/src/validator.js +0 -1
- package/package.json +80 -75
- 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/api.d.ts.map +1 -1
- package/types/src/libsaml.d.ts +0 -1
- package/types/src/libsaml.d.ts.map +1 -1
- package/types/src/schemaValidator.d.ts +2 -0
- package/types/src/schemaValidator.d.ts.map +1 -0
- package/types/src/utility.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,317 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE schema SYSTEM "D:\Project\samlify\src\schema\XMLSchema.dtd"
|
|
3
|
+
[
|
|
4
|
+
<!ATTLIST schema
|
|
5
|
+
xmlns:ds CDATA #FIXED "http://www.w3.org/2000/09/xmldsig#">
|
|
6
|
+
<!ENTITY dsig 'http://www.w3.org/2000/09/xmldsig#'>
|
|
7
|
+
<!ENTITY % p ''>
|
|
8
|
+
<!ENTITY % s ''>
|
|
9
|
+
]>
|
|
10
|
+
|
|
11
|
+
<!-- Schema for XML Signatures
|
|
12
|
+
http://www.w3.org/2000/09/xmldsig#
|
|
13
|
+
$Revision: 1.1 $ on $Date: 2002/02/08 20:32:26 $ by $Author: reagle $
|
|
14
|
+
|
|
15
|
+
Copyright 2001 The Internet Society and W3C (Massachusetts Institute
|
|
16
|
+
of Technology, Institut National de Recherche en Informatique et en
|
|
17
|
+
Automatique, Keio University). All Rights Reserved.
|
|
18
|
+
http://www.w3.org/Consortium/Legal/
|
|
19
|
+
|
|
20
|
+
This document is governed by the W3C Software License [1] as described
|
|
21
|
+
in the FAQ [2].
|
|
22
|
+
|
|
23
|
+
[1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
|
|
24
|
+
[2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
|
|
25
|
+
-->
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
<schema xmlns="http://www.w3.org/2001/XMLSchema"
|
|
29
|
+
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
|
|
30
|
+
targetNamespace="http://www.w3.org/2000/09/xmldsig#"
|
|
31
|
+
version="0.1" elementFormDefault="qualified">
|
|
32
|
+
|
|
33
|
+
<!-- Basic Types Defined for Signatures -->
|
|
34
|
+
|
|
35
|
+
<simpleType name="CryptoBinary">
|
|
36
|
+
<restriction base="base64Binary">
|
|
37
|
+
</restriction>
|
|
38
|
+
</simpleType>
|
|
39
|
+
|
|
40
|
+
<!-- Start Signature -->
|
|
41
|
+
|
|
42
|
+
<element name="Signature" type="ds:SignatureType"/>
|
|
43
|
+
<complexType name="SignatureType">
|
|
44
|
+
<sequence>
|
|
45
|
+
<element ref="ds:SignedInfo"/>
|
|
46
|
+
<element ref="ds:SignatureValue"/>
|
|
47
|
+
<element ref="ds:KeyInfo" minOccurs="0"/>
|
|
48
|
+
<element ref="ds:Object" minOccurs="0" maxOccurs="unbounded"/>
|
|
49
|
+
</sequence>
|
|
50
|
+
<attribute name="Id" type="ID" use="optional"/>
|
|
51
|
+
</complexType>
|
|
52
|
+
|
|
53
|
+
<element name="SignatureValue" type="ds:SignatureValueType"/>
|
|
54
|
+
<complexType name="SignatureValueType">
|
|
55
|
+
<simpleContent>
|
|
56
|
+
<extension base="base64Binary">
|
|
57
|
+
<attribute name="Id" type="ID" use="optional"/>
|
|
58
|
+
</extension>
|
|
59
|
+
</simpleContent>
|
|
60
|
+
</complexType>
|
|
61
|
+
|
|
62
|
+
<!-- Start SignedInfo -->
|
|
63
|
+
|
|
64
|
+
<element name="SignedInfo" type="ds:SignedInfoType"/>
|
|
65
|
+
<complexType name="SignedInfoType">
|
|
66
|
+
<sequence>
|
|
67
|
+
<element ref="ds:CanonicalizationMethod"/>
|
|
68
|
+
<element ref="ds:SignatureMethod"/>
|
|
69
|
+
<element ref="ds:Reference" maxOccurs="unbounded"/>
|
|
70
|
+
</sequence>
|
|
71
|
+
<attribute name="Id" type="ID" use="optional"/>
|
|
72
|
+
</complexType>
|
|
73
|
+
|
|
74
|
+
<element name="CanonicalizationMethod" type="ds:CanonicalizationMethodType"/>
|
|
75
|
+
<complexType name="CanonicalizationMethodType" mixed="true">
|
|
76
|
+
<sequence>
|
|
77
|
+
<any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
|
|
78
|
+
<!-- (0,unbounded) elements from (1,1) namespace -->
|
|
79
|
+
</sequence>
|
|
80
|
+
<attribute name="Algorithm" type="anyURI" use="required"/>
|
|
81
|
+
</complexType>
|
|
82
|
+
|
|
83
|
+
<element name="SignatureMethod" type="ds:SignatureMethodType"/>
|
|
84
|
+
<complexType name="SignatureMethodType" mixed="true">
|
|
85
|
+
<sequence>
|
|
86
|
+
<element name="HMACOutputLength" minOccurs="0" type="ds:HMACOutputLengthType"/>
|
|
87
|
+
<any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
|
|
88
|
+
<!-- (0,unbounded) elements from (1,1) external namespace -->
|
|
89
|
+
</sequence>
|
|
90
|
+
<attribute name="Algorithm" type="anyURI" use="required"/>
|
|
91
|
+
</complexType>
|
|
92
|
+
|
|
93
|
+
<!-- Start Reference -->
|
|
94
|
+
|
|
95
|
+
<element name="Reference" type="ds:ReferenceType"/>
|
|
96
|
+
<complexType name="ReferenceType">
|
|
97
|
+
<sequence>
|
|
98
|
+
<element ref="ds:Transforms" minOccurs="0"/>
|
|
99
|
+
<element ref="ds:DigestMethod"/>
|
|
100
|
+
<element ref="ds:DigestValue"/>
|
|
101
|
+
</sequence>
|
|
102
|
+
<attribute name="Id" type="ID" use="optional"/>
|
|
103
|
+
<attribute name="URI" type="anyURI" use="optional"/>
|
|
104
|
+
<attribute name="Type" type="anyURI" use="optional"/>
|
|
105
|
+
</complexType>
|
|
106
|
+
|
|
107
|
+
<element name="Transforms" type="ds:TransformsType"/>
|
|
108
|
+
<complexType name="TransformsType">
|
|
109
|
+
<sequence>
|
|
110
|
+
<element ref="ds:Transform" maxOccurs="unbounded"/>
|
|
111
|
+
</sequence>
|
|
112
|
+
</complexType>
|
|
113
|
+
|
|
114
|
+
<element name="Transform" type="ds:TransformType"/>
|
|
115
|
+
<complexType name="TransformType" mixed="true">
|
|
116
|
+
<choice minOccurs="0" maxOccurs="unbounded">
|
|
117
|
+
<any namespace="##other" processContents="lax"/>
|
|
118
|
+
<!-- (1,1) elements from (0,unbounded) namespaces -->
|
|
119
|
+
<element name="XPath" type="string"/>
|
|
120
|
+
</choice>
|
|
121
|
+
<attribute name="Algorithm" type="anyURI" use="required"/>
|
|
122
|
+
</complexType>
|
|
123
|
+
|
|
124
|
+
<!-- End Reference -->
|
|
125
|
+
|
|
126
|
+
<element name="DigestMethod" type="ds:DigestMethodType"/>
|
|
127
|
+
<complexType name="DigestMethodType" mixed="true">
|
|
128
|
+
<sequence>
|
|
129
|
+
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
|
130
|
+
</sequence>
|
|
131
|
+
<attribute name="Algorithm" type="anyURI" use="required"/>
|
|
132
|
+
</complexType>
|
|
133
|
+
|
|
134
|
+
<element name="DigestValue" type="ds:DigestValueType"/>
|
|
135
|
+
<simpleType name="DigestValueType">
|
|
136
|
+
<restriction base="base64Binary"/>
|
|
137
|
+
</simpleType>
|
|
138
|
+
|
|
139
|
+
<!-- End SignedInfo -->
|
|
140
|
+
|
|
141
|
+
<!-- Start KeyInfo -->
|
|
142
|
+
|
|
143
|
+
<element name="KeyInfo" type="ds:KeyInfoType"/>
|
|
144
|
+
<complexType name="KeyInfoType" mixed="true">
|
|
145
|
+
<choice maxOccurs="unbounded">
|
|
146
|
+
<element ref="ds:KeyName"/>
|
|
147
|
+
<element ref="ds:KeyValue"/>
|
|
148
|
+
<element ref="ds:RetrievalMethod"/>
|
|
149
|
+
<element ref="ds:X509Data"/>
|
|
150
|
+
<element ref="ds:PGPData"/>
|
|
151
|
+
<element ref="ds:SPKIData"/>
|
|
152
|
+
<element ref="ds:MgmtData"/>
|
|
153
|
+
<any processContents="lax" namespace="##other"/>
|
|
154
|
+
<!-- (1,1) elements from (0,unbounded) namespaces -->
|
|
155
|
+
</choice>
|
|
156
|
+
<attribute name="Id" type="ID" use="optional"/>
|
|
157
|
+
</complexType>
|
|
158
|
+
|
|
159
|
+
<element name="KeyName" type="string"/>
|
|
160
|
+
<element name="MgmtData" type="string"/>
|
|
161
|
+
|
|
162
|
+
<element name="KeyValue" type="ds:KeyValueType"/>
|
|
163
|
+
<complexType name="KeyValueType" mixed="true">
|
|
164
|
+
<choice>
|
|
165
|
+
<element ref="ds:DSAKeyValue"/>
|
|
166
|
+
<element ref="ds:RSAKeyValue"/>
|
|
167
|
+
<any namespace="##other" processContents="lax"/>
|
|
168
|
+
</choice>
|
|
169
|
+
</complexType>
|
|
170
|
+
|
|
171
|
+
<element name="RetrievalMethod" type="ds:RetrievalMethodType"/>
|
|
172
|
+
<complexType name="RetrievalMethodType">
|
|
173
|
+
<sequence>
|
|
174
|
+
<element ref="ds:Transforms" minOccurs="0"/>
|
|
175
|
+
</sequence>
|
|
176
|
+
<attribute name="URI" type="anyURI"/>
|
|
177
|
+
<attribute name="Type" type="anyURI" use="optional"/>
|
|
178
|
+
</complexType>
|
|
179
|
+
|
|
180
|
+
<!-- Start X509Data -->
|
|
181
|
+
|
|
182
|
+
<element name="X509Data" type="ds:X509DataType"/>
|
|
183
|
+
<complexType name="X509DataType">
|
|
184
|
+
<sequence maxOccurs="unbounded">
|
|
185
|
+
<choice>
|
|
186
|
+
<element name="X509IssuerSerial" type="ds:X509IssuerSerialType"/>
|
|
187
|
+
<element name="X509SKI" type="base64Binary"/>
|
|
188
|
+
<element name="X509SubjectName" type="string"/>
|
|
189
|
+
<element name="X509Certificate" type="base64Binary"/>
|
|
190
|
+
<element name="X509CRL" type="base64Binary"/>
|
|
191
|
+
<any namespace="##other" processContents="lax"/>
|
|
192
|
+
</choice>
|
|
193
|
+
</sequence>
|
|
194
|
+
</complexType>
|
|
195
|
+
|
|
196
|
+
<complexType name="X509IssuerSerialType">
|
|
197
|
+
<sequence>
|
|
198
|
+
<element name="X509IssuerName" type="string"/>
|
|
199
|
+
<element name="X509SerialNumber" type="string"/>
|
|
200
|
+
</sequence>
|
|
201
|
+
</complexType>
|
|
202
|
+
|
|
203
|
+
<!-- End X509Data -->
|
|
204
|
+
|
|
205
|
+
<!-- Begin PGPData -->
|
|
206
|
+
|
|
207
|
+
<element name="PGPData" type="ds:PGPDataType"/>
|
|
208
|
+
<complexType name="PGPDataType">
|
|
209
|
+
<choice>
|
|
210
|
+
<sequence>
|
|
211
|
+
<element name="PGPKeyID" type="base64Binary"/>
|
|
212
|
+
<element name="PGPKeyPacket" type="base64Binary" minOccurs="0"/>
|
|
213
|
+
<any namespace="##other" processContents="lax" minOccurs="0"
|
|
214
|
+
maxOccurs="unbounded"/>
|
|
215
|
+
</sequence>
|
|
216
|
+
<sequence>
|
|
217
|
+
<element name="PGPKeyPacket" type="base64Binary"/>
|
|
218
|
+
<any namespace="##other" processContents="lax" minOccurs="0"
|
|
219
|
+
maxOccurs="unbounded"/>
|
|
220
|
+
</sequence>
|
|
221
|
+
</choice>
|
|
222
|
+
</complexType>
|
|
223
|
+
|
|
224
|
+
<!-- End PGPData -->
|
|
225
|
+
|
|
226
|
+
<!-- Begin SPKIData -->
|
|
227
|
+
|
|
228
|
+
<element name="SPKIData" type="ds:SPKIDataType"/>
|
|
229
|
+
<complexType name="SPKIDataType">
|
|
230
|
+
<sequence maxOccurs="unbounded">
|
|
231
|
+
<element name="SPKISexp" type="base64Binary"/>
|
|
232
|
+
<any namespace="##other" processContents="lax" minOccurs="0"/>
|
|
233
|
+
</sequence>
|
|
234
|
+
</complexType>
|
|
235
|
+
|
|
236
|
+
<!-- End SPKIData -->
|
|
237
|
+
|
|
238
|
+
<!-- End KeyInfo -->
|
|
239
|
+
|
|
240
|
+
<!-- Start Object (Manifest, SignatureProperty) -->
|
|
241
|
+
|
|
242
|
+
<element name="Object" type="ds:ObjectType"/>
|
|
243
|
+
<complexType name="ObjectType" mixed="true">
|
|
244
|
+
<sequence minOccurs="0" maxOccurs="unbounded">
|
|
245
|
+
<any namespace="##any" processContents="lax"/>
|
|
246
|
+
</sequence>
|
|
247
|
+
<attribute name="Id" type="ID" use="optional"/>
|
|
248
|
+
<attribute name="MimeType" type="string" use="optional"/> <!-- add a grep facet -->
|
|
249
|
+
<attribute name="Encoding" type="anyURI" use="optional"/>
|
|
250
|
+
</complexType>
|
|
251
|
+
|
|
252
|
+
<element name="Manifest" type="ds:ManifestType"/>
|
|
253
|
+
<complexType name="ManifestType">
|
|
254
|
+
<sequence>
|
|
255
|
+
<element ref="ds:Reference" maxOccurs="unbounded"/>
|
|
256
|
+
</sequence>
|
|
257
|
+
<attribute name="Id" type="ID" use="optional"/>
|
|
258
|
+
</complexType>
|
|
259
|
+
|
|
260
|
+
<element name="SignatureProperties" type="ds:SignaturePropertiesType"/>
|
|
261
|
+
<complexType name="SignaturePropertiesType">
|
|
262
|
+
<sequence>
|
|
263
|
+
<element ref="ds:SignatureProperty" maxOccurs="unbounded"/>
|
|
264
|
+
</sequence>
|
|
265
|
+
<attribute name="Id" type="ID" use="optional"/>
|
|
266
|
+
</complexType>
|
|
267
|
+
|
|
268
|
+
<element name="SignatureProperty" type="ds:SignaturePropertyType"/>
|
|
269
|
+
<complexType name="SignaturePropertyType" mixed="true">
|
|
270
|
+
<choice maxOccurs="unbounded">
|
|
271
|
+
<any namespace="##other" processContents="lax"/>
|
|
272
|
+
<!-- (1,1) elements from (1,unbounded) namespaces -->
|
|
273
|
+
</choice>
|
|
274
|
+
<attribute name="Target" type="anyURI" use="required"/>
|
|
275
|
+
<attribute name="Id" type="ID" use="optional"/>
|
|
276
|
+
</complexType>
|
|
277
|
+
|
|
278
|
+
<!-- End Object (Manifest, SignatureProperty) -->
|
|
279
|
+
|
|
280
|
+
<!-- Start Algorithm Parameters -->
|
|
281
|
+
|
|
282
|
+
<simpleType name="HMACOutputLengthType">
|
|
283
|
+
<restriction base="integer"/>
|
|
284
|
+
</simpleType>
|
|
285
|
+
|
|
286
|
+
<!-- Start KeyValue Element-types -->
|
|
287
|
+
|
|
288
|
+
<element name="DSAKeyValue" type="ds:DSAKeyValueType"/>
|
|
289
|
+
<complexType name="DSAKeyValueType">
|
|
290
|
+
<sequence>
|
|
291
|
+
<sequence minOccurs="0">
|
|
292
|
+
<element name="P" type="ds:CryptoBinary"/>
|
|
293
|
+
<element name="Q" type="ds:CryptoBinary"/>
|
|
294
|
+
</sequence>
|
|
295
|
+
<element name="G" type="ds:CryptoBinary" minOccurs="0"/>
|
|
296
|
+
<element name="Y" type="ds:CryptoBinary"/>
|
|
297
|
+
<element name="J" type="ds:CryptoBinary" minOccurs="0"/>
|
|
298
|
+
<sequence minOccurs="0">
|
|
299
|
+
<element name="Seed" type="ds:CryptoBinary"/>
|
|
300
|
+
<element name="PgenCounter" type="ds:CryptoBinary"/>
|
|
301
|
+
</sequence>
|
|
302
|
+
</sequence>
|
|
303
|
+
</complexType>
|
|
304
|
+
|
|
305
|
+
<element name="RSAKeyValue" type="ds:RSAKeyValueType"/>
|
|
306
|
+
<complexType name="RSAKeyValueType">
|
|
307
|
+
<sequence>
|
|
308
|
+
<element name="Modulus" type="ds:CryptoBinary"/>
|
|
309
|
+
<element name="Exponent" type="ds:CryptoBinary"/>
|
|
310
|
+
</sequence>
|
|
311
|
+
</complexType>
|
|
312
|
+
|
|
313
|
+
<!-- End KeyValue Element-types -->
|
|
314
|
+
|
|
315
|
+
<!-- End Signature -->
|
|
316
|
+
|
|
317
|
+
</schema>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { validateXML } from 'xmllint-wasm';
|
|
2
|
+
import * as fs from 'node:fs';
|
|
3
|
+
import * as path from 'node:path';
|
|
4
|
+
const schemas = [
|
|
5
|
+
'saml-schema-protocol-2.0.xsd',
|
|
6
|
+
'datatypes.dtd',
|
|
7
|
+
'saml-schema-assertion-2.0.xsd',
|
|
8
|
+
'xmldsig-core-schema.xsd',
|
|
9
|
+
'XMLSchema.dtd',
|
|
10
|
+
'xenc-schema.xsd'
|
|
11
|
+
];
|
|
12
|
+
export const validate = async (xml) => {
|
|
13
|
+
const schemaPath = path.resolve(__dirname, 'schema');
|
|
14
|
+
const [schema, ...preload] = await Promise.all(schemas.map(async (file) => ({
|
|
15
|
+
fileName: file,
|
|
16
|
+
contents: await fs.promises.readFile(`${schemaPath}/${file}`, 'utf-8')
|
|
17
|
+
})));
|
|
18
|
+
try {
|
|
19
|
+
const validationResult = await validateXML({
|
|
20
|
+
xml: [
|
|
21
|
+
{
|
|
22
|
+
fileName: 'content.xml',
|
|
23
|
+
contents: xml,
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
extension: 'schema',
|
|
27
|
+
schema: [schema.contents],
|
|
28
|
+
preload: preload
|
|
29
|
+
});
|
|
30
|
+
if (validationResult.valid) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
console.debug(validationResult);
|
|
34
|
+
throw validationResult.errors;
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
console.error('[ERROR] validateXML', error);
|
|
38
|
+
throw new Error('ERR_EXCEPTION_VALIDATE_XML');
|
|
39
|
+
}
|
|
40
|
+
};
|
package/build/src/types.js
CHANGED
|
@@ -2,4 +2,3 @@ export { IdentityProvider as IdentityProviderConstructor } from './entity-idp.js
|
|
|
2
2
|
export { IdpMetadata as IdentityProviderMetadata } from './metadata-idp.js';
|
|
3
3
|
export { ServiceProvider as ServiceProviderConstructor } from './entity-sp.js';
|
|
4
4
|
export { SpMetadata as ServiceProviderMetadata } from './metadata-sp.js';
|
|
5
|
-
//# sourceMappingURL=types.js.map
|
package/build/src/urn.js
CHANGED
|
@@ -202,4 +202,3 @@ const elementsOrder = {
|
|
|
202
202
|
shibboleth: ['KeyDescriptor', 'SingleLogoutService', 'NameIDFormat', 'AssertionConsumerService', 'AttributeConsumingService'],
|
|
203
203
|
};
|
|
204
204
|
export { namespace, tags, algorithms, wording, elementsOrder, messageConfigurations };
|
|
205
|
-
//# sourceMappingURL=urn.js.map
|
package/build/src/utility.js
CHANGED
package/build/src/validator.js
CHANGED
package/package.json
CHANGED
|
@@ -1,75 +1,80 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "samlesa",
|
|
3
|
-
"version": "2.14.
|
|
4
|
-
"description": "High-level API for Single Sign On (SAML 2.0) baseed on samlify ",
|
|
5
|
-
"main": "build/index.js",
|
|
6
|
-
"keywords": [
|
|
7
|
-
"nodejs",
|
|
8
|
-
"saml2",
|
|
9
|
-
"sso",
|
|
10
|
-
"slo",
|
|
11
|
-
"metadata"
|
|
12
|
-
],
|
|
13
|
-
"type": "module",
|
|
14
|
-
"typings": "types/index.d.ts",
|
|
15
|
-
"scripts": {
|
|
16
|
-
"build": "tsc",
|
|
17
|
-
"docs": "docsify serve -o docs",
|
|
18
|
-
"lint": "tslint -p .",
|
|
19
|
-
"lint:fix": "tslint -p . --fix",
|
|
20
|
-
"pretest": "make pretest",
|
|
21
|
-
"test": "NODE_ENV=test nyc ava",
|
|
22
|
-
"coverage": "nyc report --reporter=text-lcov | coveralls",
|
|
23
|
-
"hooks:postinstall": "ln -sf $PWD/.pre-commit.sh $PWD/.git/hooks/pre-commit"
|
|
24
|
-
},
|
|
25
|
-
"exports": {
|
|
26
|
-
".": {
|
|
27
|
-
"types": "./types/index.d.ts",
|
|
28
|
-
"import": "./build/index.js"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"files": [
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
],
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"xml
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"@microsoft/api-extractor": "7.52.8",
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "samlesa",
|
|
3
|
+
"version": "2.14.9",
|
|
4
|
+
"description": "High-level API for Single Sign On (SAML 2.0) baseed on samlify ",
|
|
5
|
+
"main": "build/index.js",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"nodejs",
|
|
8
|
+
"saml2",
|
|
9
|
+
"sso",
|
|
10
|
+
"slo",
|
|
11
|
+
"metadata"
|
|
12
|
+
],
|
|
13
|
+
"type": "module",
|
|
14
|
+
"typings": "types/index.d.ts",
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc && copyfiles -u 1 src/schema/**/* build/src",
|
|
17
|
+
"docs": "docsify serve -o docs",
|
|
18
|
+
"lint": "tslint -p .",
|
|
19
|
+
"lint:fix": "tslint -p . --fix",
|
|
20
|
+
"pretest": "make pretest",
|
|
21
|
+
"test": "NODE_ENV=test nyc ava",
|
|
22
|
+
"coverage": "nyc report --reporter=text-lcov | coveralls",
|
|
23
|
+
"hooks:postinstall": "ln -sf $PWD/.pre-commit.sh $PWD/.git/hooks/pre-commit"
|
|
24
|
+
},
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./types/index.d.ts",
|
|
28
|
+
"import": "./build/index.js"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"build",
|
|
33
|
+
"types"
|
|
34
|
+
],
|
|
35
|
+
"contributors": [
|
|
36
|
+
"Veclea <vemocle@gmail.com>"
|
|
37
|
+
],
|
|
38
|
+
"author": "Veclea",
|
|
39
|
+
"repository": {
|
|
40
|
+
"url": "https://github.com/Veclea/samlify.git",
|
|
41
|
+
"type": "git"
|
|
42
|
+
},
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@xmldom/xmldom": "^0.8.6",
|
|
46
|
+
"camelcase": "^8.0.0",
|
|
47
|
+
"pako": "^2.1.0",
|
|
48
|
+
"uuid": "^11.1.0",
|
|
49
|
+
"xml": "^1.0.1",
|
|
50
|
+
"xml-crypto": "^6.1.2",
|
|
51
|
+
"xml-encryption": "^3.1.0",
|
|
52
|
+
"xml-escape": "^1.1.0",
|
|
53
|
+
"xmllint-wasm": "^4.0.2",
|
|
54
|
+
"xpath": "^0.0.32"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@microsoft/api-extractor": "7.52.8",
|
|
58
|
+
"@types/node": "^22.15.17",
|
|
59
|
+
"@types/pako": "2.0.3",
|
|
60
|
+
"@types/uuid": "10.0.0",
|
|
61
|
+
"ava": "^4.1.0",
|
|
62
|
+
"copyfiles": "^2.4.1",
|
|
63
|
+
"coveralls": "^3.1.1",
|
|
64
|
+
"esbuild": "^0.25.4",
|
|
65
|
+
"nyc": "^17.1.0",
|
|
66
|
+
"timekeeper": "^2.2.0",
|
|
67
|
+
"typescript": "5.8.3"
|
|
68
|
+
},
|
|
69
|
+
"ava": {
|
|
70
|
+
"extensions": [
|
|
71
|
+
"ts"
|
|
72
|
+
],
|
|
73
|
+
"require": [
|
|
74
|
+
"ts-node/register"
|
|
75
|
+
],
|
|
76
|
+
"files": [
|
|
77
|
+
"!**/*.d.ts"
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
}
|
package/types/api.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DOMParser as dom } from '@xmldom/xmldom';
|
|
2
|
+
import type { Options as DOMParserOptions } from '@xmldom/xmldom';
|
|
3
|
+
interface Context extends ValidatorContext, DOMParserContext {
|
|
4
|
+
}
|
|
5
|
+
interface ValidatorContext {
|
|
6
|
+
validate?: (xml: string) => Promise<any>;
|
|
7
|
+
}
|
|
8
|
+
interface DOMParserContext {
|
|
9
|
+
dom: dom;
|
|
10
|
+
}
|
|
11
|
+
export declare function getContext(): Context;
|
|
12
|
+
export declare function setSchemaValidator(params: ValidatorContext): void;
|
|
13
|
+
export declare function setDOMParserOptions(options?: DOMParserOptions): void;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElE,UAAU,OAAQ,SAAQ,gBAAgB,EAAE,gBAAgB;CAAG;AAE/D,UAAU,gBAAgB;IACxB,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;CAC1C;AAED,UAAU,gBAAgB;IACxB,GAAG,EAAE,GAAG,CAAC;CACV;AAOD,wBAAgB,UAAU,IAAG,OAAO,CAEnC;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,gBAAgB,GAAE,IAAI,CAShE;AAED,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,gBAAqB,GAAE,IAAI,CAEvE"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file binding-post.ts
|
|
3
|
+
* @author tngan
|
|
4
|
+
* @desc Binding-level API, declare the functions using POST binding
|
|
5
|
+
*/
|
|
6
|
+
import type { BindingContext } from './entity.js';
|
|
7
|
+
/**
|
|
8
|
+
* @desc Generate a base64 encoded login request
|
|
9
|
+
* @param {string} referenceTagXPath reference uri
|
|
10
|
+
* @param {object} entity object includes both idp and sp
|
|
11
|
+
* @param {function} customTagReplacement used when developers have their own login response template
|
|
12
|
+
*/
|
|
13
|
+
declare function base64LoginRequest(referenceTagXPath: string, entity: any, customTagReplacement?: (template: string) => BindingContext): BindingContext;
|
|
14
|
+
/**
|
|
15
|
+
* @desc Generate a base64 encoded login response
|
|
16
|
+
* @param {object} requestInfo corresponding request, used to obtain the id
|
|
17
|
+
* @param {object} entity object includes both idp and sp
|
|
18
|
+
* @param {object} user current logged user (e.g. req.user)
|
|
19
|
+
* @param {function} customTagReplacement used when developers have their own login response template
|
|
20
|
+
* @param {boolean} encryptThenSign whether or not to encrypt then sign first (if signing). Defaults to sign-then-encrypt
|
|
21
|
+
* @param AttributeStatement
|
|
22
|
+
*/
|
|
23
|
+
declare function base64LoginResponse(requestInfo: any | undefined, entity: any, user?: any, customTagReplacement?: (template: string) => BindingContext, encryptThenSign?: boolean, AttributeStatement?: never[]): Promise<BindingContext>;
|
|
24
|
+
/**
|
|
25
|
+
* @desc Generate a base64 encoded logout request
|
|
26
|
+
* @param {object} user current logged user (e.g. req.user)
|
|
27
|
+
* @param {string} referenceTagXPath reference uri
|
|
28
|
+
* @param {object} entity object includes both idp and sp
|
|
29
|
+
* @param {function} customTagReplacement used when developers have their own login response template
|
|
30
|
+
* @return {string} base64 encoded request
|
|
31
|
+
*/
|
|
32
|
+
declare function base64LogoutRequest(user: Record<string, unknown>, referenceTagXPath: string, entity: any, customTagReplacement?: (template: string) => BindingContext): BindingContext;
|
|
33
|
+
/**
|
|
34
|
+
* @desc Generate a base64 encoded logout response
|
|
35
|
+
* @param {object} requestInfo corresponding request, used to obtain the id
|
|
36
|
+
* @param {string} referenceTagXPath reference uri
|
|
37
|
+
* @param {object} entity object includes both idp and sp
|
|
38
|
+
* @param {function} customTagReplacement used when developers have their own login response template
|
|
39
|
+
*/
|
|
40
|
+
declare function base64LogoutResponse(requestInfo: any, entity: any, customTagReplacement: (template: string) => BindingContext): BindingContext;
|
|
41
|
+
declare const postBinding: {
|
|
42
|
+
base64LoginRequest: typeof base64LoginRequest;
|
|
43
|
+
base64LoginResponse: typeof base64LoginResponse;
|
|
44
|
+
base64LogoutRequest: typeof base64LogoutRequest;
|
|
45
|
+
base64LogoutResponse: typeof base64LogoutResponse;
|
|
46
|
+
};
|
|
47
|
+
export default postBinding;
|
|
48
|
+
//# sourceMappingURL=binding-post.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binding-post.d.ts","sourceRoot":"","sources":["../src/binding-post.ts"],"names":[],"mappings":"AAAA;;;;EAIE;AAGF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAMlD;;;;;EAKE;AACF,iBAAS,kBAAkB,CAAC,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,GAAG,cAAc,CAqD/I;AACD;;;;;;;;GAQG;AACH,iBAAe,mBAAmB,CAAC,WAAW,EAAE,GAAG,YAAK,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,GAAE,GAAQ,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,EAAE,eAAe,GAAE,OAAe,EAAG,kBAAkB,UAAG,GAAG,OAAO,CAAC,cAAc,CAAC,CAuIrO;AACD;;;;;;;EAOE;AACF,iBAAS,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,EAAC,MAAM,EAAE,MAAM,KAAA,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,GAAG,cAAc,CAkDzK;AACD;;;;;;EAME;AACF,iBAAS,oBAAoB,CAAC,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,GAAG,cAAc,CAsDvI;AAED,QAAA,MAAM,WAAW;;;;;CAKhB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|