@boxyhq/saml-jackson 1.1.0 → 1.1.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.
@@ -132,7 +132,7 @@ class OAuthController {
132
132
  }
133
133
  authorize(body) {
134
134
  return __awaiter(this, void 0, void 0, function* () {
135
- const { response_type = 'code', client_id, redirect_uri, state, tenant, product, access_type, scope, nonce, code_challenge, code_challenge_method = '',
135
+ const { response_type = 'code', client_id, redirect_uri, state, tenant, product, access_type, resource, scope, nonce, code_challenge, code_challenge_method = '',
136
136
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
137
137
  provider = 'saml', idp_hint, } = body;
138
138
  let requestedTenant = tenant;
@@ -178,6 +178,9 @@ class OAuthController {
178
178
  if (!sp && access_type) {
179
179
  sp = getEncodedTenantProduct(access_type);
180
180
  }
181
+ if (!sp && resource) {
182
+ sp = getEncodedTenantProduct(resource);
183
+ }
181
184
  if (!sp && requestedScopes) {
182
185
  const encodedParams = requestedScopes.find((scope) => scope.includes('=') && scope.includes('&')); // for now assume only one encoded param i.e. for tenant/product
183
186
  if (encodedParams) {
package/dist/typings.d.ts CHANGED
@@ -70,6 +70,7 @@ export interface OAuthReqBody {
70
70
  tenant?: string;
71
71
  product?: string;
72
72
  access_type?: string;
73
+ resource?: string;
73
74
  scope?: string;
74
75
  nonce?: string;
75
76
  code_challenge: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boxyhq/saml-jackson",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "SAML Jackson library",
5
5
  "keywords": [
6
6
  "SAML 2.0"
@@ -55,7 +55,7 @@
55
55
  "xmlbuilder": "15.1.1"
56
56
  },
57
57
  "devDependencies": {
58
- "@types/node": "18.0.6",
58
+ "@types/node": "18.6.1",
59
59
  "@types/sinon": "10.0.13",
60
60
  "@types/tap": "15.0.7",
61
61
  "@typescript-eslint/eslint-plugin": "5.30.7",