Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@fontsource/roboto": "^5.2.10",
"@mui/icons-material": "^9.0.1",
"@mui/material": "^9.0.1",
"fast-xml-parser": "^5.6.0",
"fast-xml-parser": "^5.9.3",
"js-base64": "^3.7.8",
"react": "^19.2.7",
"react-dom": "^19.2.7"
Expand Down
65 changes: 43 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 10 additions & 7 deletions src/common/services/saml-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ function buildSamlpAuthnRequest(elem: Record<string, unknown>): SamlpAuthnReques
"@_AssertionConsumerServiceURL",
"@_ProviderName",
"@_Destination",
"#text",
]);

return {
Expand Down Expand Up @@ -183,7 +184,7 @@ export type SamlpNameIdPolicy = {
};

function buildSamlNameIdPolicy(elem: Record<string, unknown>): SamlpNameIdPolicy {
warnUnhandledKeys("NameIDPolicy", elem, ["@_Format", "@_AllowCreate"]);
warnUnhandledKeys("NameIDPolicy", elem, ["@_Format", "@_AllowCreate", "#text"]);

return {
$format: getStringAttr(elem, "@_Format"),
Expand Down Expand Up @@ -304,6 +305,7 @@ function buildSamlpResponse(elem: Record<string, unknown>): SamlpResponse {
"@_IssueInstant",
"@_Destination",
"Assertion",
"#text",
]);

return {
Expand Down Expand Up @@ -364,7 +366,7 @@ function buildSamlpStatusCode(elem: Record<string, unknown>): SamlpStatusCode {
const valueAttr = getStringAttr(elem, "@_Value");
const $value = valueAttr === undefined ? new Error("Value attribute not found") : valueAttr;

warnUnhandledKeys("StatusCode", elem, ["StatusCode", "@_Value"]);
warnUnhandledKeys("StatusCode", elem, ["StatusCode", "@_Value", "#text"]);

return {
statusCode,
Expand Down Expand Up @@ -564,6 +566,7 @@ function buildSamlSubjectConfirmationData(
"@_NotOnOrAfter",
"@_Recipient",
"@_InResponseTo",
"#text",
]);

return {
Expand Down Expand Up @@ -935,7 +938,7 @@ function buildDsCanonicalizationMethod(elem: Record<string, unknown>): DsCanonic
const $algorithm =
algorithmAttr === undefined ? new Error("Algorithm attribute not found") : algorithmAttr;

warnUnhandledKeys("CanonicalizationMethod", elem, ["@_Algorithm"]);
warnUnhandledKeys("CanonicalizationMethod", elem, ["@_Algorithm", "#text"]);

return { $algorithm };
}
Expand All @@ -949,7 +952,7 @@ function buildDsSignatureMethod(elem: Record<string, unknown>): DsSignatureMetho
const $algorithm =
algorithmAttr === undefined ? new Error("Algorithm attribute not found") : algorithmAttr;

warnUnhandledKeys("SignatureMethod", elem, ["@_Algorithm"]);
warnUnhandledKeys("SignatureMethod", elem, ["@_Algorithm", "#text"]);

return { $algorithm };
}
Expand Down Expand Up @@ -997,7 +1000,7 @@ function buildDsTransform(elem: Record<string, unknown>): DsTransform {
const $algorithm =
algorithmAttr === undefined ? new Error("Algorithm attribute not found") : algorithmAttr;

warnUnhandledKeys("Transform", elem, ["@_Algorithm"]);
warnUnhandledKeys("Transform", elem, ["@_Algorithm", "#text"]);

return { $algorithm };
}
Expand All @@ -1011,7 +1014,7 @@ function buildDsDigestMethod(elem: Record<string, unknown>): DsDigestMethod {
const $algorithm =
algorithmAttr === undefined ? new Error("Algorithm attribute not found") : algorithmAttr;

warnUnhandledKeys("DigestMethod", elem, ["@_Algorithm"]);
warnUnhandledKeys("DigestMethod", elem, ["@_Algorithm", "#text"]);

return { $algorithm };
}
Expand Down Expand Up @@ -1054,7 +1057,7 @@ function buildDsKeyInfo(elem: Record<string, unknown>): DsKeyInfo {
const keyNameElem = getChildElement(elem, "KeyName");
const keyName = keyNameElem && buildDsKeyName(keyNameElem);

warnUnhandledKeys("KeyInfo", elem, ["X509Data", "KeyName"]);
warnUnhandledKeys("KeyInfo", elem, ["X509Data", "KeyName", "KeyValue"]);

return { x509Data, keyName };
}
Expand Down