@boxyhq/saml-jackson 0.3.6-beta.586 → 0.3.6-beta.603

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.
@@ -40,9 +40,6 @@ const allowed = __importStar(require("./oauth/allowed"));
40
40
  const codeVerifier = __importStar(require("./oauth/code-verifier"));
41
41
  const redirect = __importStar(require("./oauth/redirect"));
42
42
  const utils_1 = require("./utils");
43
- const util_1 = require("util");
44
- const zlib_1 = require("zlib");
45
- const deflateRawAsync = (0, util_1.promisify)(zlib_1.deflateRaw);
46
43
  const relayStatePrefix = 'boxyhq_jackson_';
47
44
  function getEncodedClientId(client_id) {
48
45
  try {
@@ -134,20 +131,19 @@ class OAuthController {
134
131
  code_challenge_method,
135
132
  });
136
133
  const relayState = relayStatePrefix + sessionId;
134
+ const samlReqEnc = Buffer.from(samlReq.request).toString('base64');
137
135
  const { sso } = samlConfig.idpMetadata;
138
136
  let redirectUrl = '';
139
137
  let authorizeForm = '';
140
138
  // HTTP redirect binding
141
139
  if ('redirectUrl' in sso) {
142
- const samlReqEnc = yield deflateRawAsync(samlReq.request);
143
140
  redirectUrl = redirect.success(sso.redirectUrl, {
144
141
  RelayState: relayState,
145
- SAMLRequest: Buffer.from(samlReqEnc).toString('base64'),
142
+ SAMLRequest: samlReqEnc,
146
143
  });
147
144
  }
148
145
  // HTTP POST binding
149
146
  if ('postUrl' in sso) {
150
- const samlReqEnc = Buffer.from(samlReq.request).toString('base64');
151
147
  authorizeForm = (0, utils_1.createAuthorizeForm)(relayState, samlReqEnc, sso.postUrl);
152
148
  }
153
149
  return {
package/dist/saml/saml.js CHANGED
@@ -68,7 +68,7 @@ const request = ({ ssoUrl, entityID, callbackUrl, isPassive = false, forceAuthn
68
68
  '@ID': id,
69
69
  '@Version': '2.0',
70
70
  '@IssueInstant': date,
71
- '@ProtocolBinding': 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect',
71
+ '@ProtocolBinding': 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST',
72
72
  '@Destination': ssoUrl,
73
73
  'saml:Issuer': {
74
74
  '@xmlns:saml': 'urn:oasis:names:tc:SAML:2.0:assertion',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boxyhq/saml-jackson",
3
- "version": "0.3.6-beta.586",
3
+ "version": "0.3.6-beta.603",
4
4
  "description": "SAML 2.0 service",
5
5
  "keywords": [
6
6
  "SAML 2.0"
@@ -34,8 +34,6 @@
34
34
  "@boxyhq/saml20": "0.2.0",
35
35
  "@peculiar/webcrypto": "1.2.3",
36
36
  "@peculiar/x509": "1.6.1",
37
- "cors": "2.8.5",
38
- "express": "4.17.2",
39
37
  "mongodb": "4.3.0",
40
38
  "mysql2": "2.3.3",
41
39
  "pg": "8.7.1",