@flipdish/authorization 0.2.13-rc.1765379152 → 0.2.14-rc.1766078374

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/README.md CHANGED
@@ -70,13 +70,15 @@ describe("Authorization Tests", () => {
70
70
  });
71
71
 
72
72
  test("List Feature Based Roles", async () => {
73
- const featureBasedRolesResponse = await configurationData.listFeatureBasedRoles();
73
+ const featureBasedRolesResponse =
74
+ await configurationData.listFeatureBasedRoles();
74
75
  expect(featureBasedRolesResponse.status).toBe(200);
75
76
  expect(featureBasedRolesResponse.data.roles).toBeDefined();
76
77
  expect(featureBasedRolesResponse.data.roles.length).toBeGreaterThan(0);
77
- expect(featureBasedRolesResponse.data.roles).toContainEqual(
78
- { name: "OrgViewer", permissions: ["ViewOrg"] }
79
- );
78
+ expect(featureBasedRolesResponse.data.roles).toContainEqual({
79
+ name: "OrgViewer",
80
+ permissions: ["ViewOrg"],
81
+ });
80
82
  });
81
83
 
82
84
  test("List named roles", async () => {
@@ -205,29 +207,32 @@ describe("Authorization Tests", () => {
205
207
  });
206
208
 
207
209
  it("should authenticate and check if a user is in a role with a valid FD-Authorization cookie", async () => {
208
- const isInRoleResponse = await authorization.authenticateAndCheckIsInRole({
209
- headers: {
210
- Cookie: `FD-Authorization=${process.env.FD_AUTH_COOKIE_PROD};`,
211
- },
212
- roles: ["Admin"],
213
- });
210
+ const isInRoleResponse =
211
+ await authorization.authenticateAndCheckIsInRole({
212
+ headers: {
213
+ Cookie: `FD-Authorization=${process.env.FD_AUTH_COOKIE_PROD};`,
214
+ },
215
+ roles: ["Admin"],
216
+ });
214
217
  expect(isInRoleResponse.status).toBe(200);
215
218
  expect(isInRoleResponse.data.authorized).toBe(false);
216
219
  });
217
220
 
218
221
  it("should authenticate and check if a user is in a role with a valid Bearer token", async () => {
219
- const isInRoleResponse = await authorization.authenticateAndCheckIsInRole({
220
- headers: {
221
- Authorization: `Bearer ${process.env.FLIPDISH_BEARER_TOKEN_PROD}`,
222
- },
223
- roles: ["Admin"],
224
- });
222
+ const isInRoleResponse =
223
+ await authorization.authenticateAndCheckIsInRole({
224
+ headers: {
225
+ Authorization: `Bearer ${process.env.FLIPDISH_BEARER_TOKEN_PROD}`,
226
+ },
227
+ roles: ["Admin"],
228
+ });
225
229
  expect(isInRoleResponse.status).toBe(200);
226
230
  expect(isInRoleResponse.data.authorized).toBe(false);
227
231
  });
228
232
  });
229
233
  });
230
234
  });
235
+
231
236
  ```
232
237
 
233
238
  The generated Node module can be used in the following environments:
package/configuration.ts CHANGED
@@ -100,7 +100,7 @@ export class Configuration {
100
100
 
101
101
  const extraHeaders = param.useDefaultUserAgent ? {} : {
102
102
  headers: {
103
- "user-agent": "Flipdish authorization typescript SDK / 0.2.13-rc.1765379152"
103
+ "user-agent": "Flipdish authorization typescript SDK / 0.2.14-rc.1766078374"
104
104
  }
105
105
  };
106
106
 
@@ -36,7 +36,7 @@ var Configuration = /** @class */ (function () {
36
36
  this.serverIndex = param.serverIndex;
37
37
  var extraHeaders = param.useDefaultUserAgent ? {} : {
38
38
  headers: {
39
- "user-agent": "Flipdish authorization typescript SDK / 0.2.13-rc.1765379152"
39
+ "user-agent": "Flipdish authorization typescript SDK / 0.2.14-rc.1766078374"
40
40
  }
41
41
  };
42
42
  this.baseOptions = __assign(__assign({}, extraHeaders), param.baseOptions);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flipdish/authorization",
3
- "version": "0.2.13-rc.1765379152",
3
+ "version": "0.2.14-rc.1766078374",
4
4
  "description": "OpenAPI client for @flipdish/authorization",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {