diff --git a/package-lock.json b/package-lock.json index eaa6ca69..d92d4f32 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16068,7 +16068,7 @@ }, "packages/video": { "name": "@vonage/video", - "version": "1.3.0", + "version": "1.4.0", "license": "Apache-2.0", "dependencies": { "@vonage/auth": "^1.1.2", diff --git a/packages/video/__tests__/video.test.ts b/packages/video/__tests__/video.test.ts index 53157851..540259a1 100644 --- a/packages/video/__tests__/video.test.ts +++ b/packages/video/__tests__/video.test.ts @@ -179,6 +179,7 @@ describe('video', () => { expect(decoded.payload.application_id).toEqual('abcd-1234'); expect(decoded.payload.scope).toEqual('session.connect'); expect(decoded.payload.session_id).toEqual('abcd'); + expect(decoded.payload.acl.paths).toEqual({'/video/**': {}}); }); test("can generate a client JWT token with renamed values", async () => { diff --git a/packages/video/lib/interfaces/ClientTokenClaims.ts b/packages/video/lib/interfaces/ClientTokenClaims.ts index 934b784f..ab02aa4a 100644 --- a/packages/video/lib/interfaces/ClientTokenClaims.ts +++ b/packages/video/lib/interfaces/ClientTokenClaims.ts @@ -6,4 +6,9 @@ export interface ClientTokenClaims { data?: string exp?: number connection_data?: string + acl: { + paths: { + [key: string]: object + } + } } \ No newline at end of file diff --git a/packages/video/lib/video.ts b/packages/video/lib/video.ts index 55ad6e63..c65e2195 100644 --- a/packages/video/lib/video.ts +++ b/packages/video/lib/video.ts @@ -172,6 +172,11 @@ export class Video extends Client { session_id: sessionId, role: 'publisher', initial_layout_class_list: '', + acl: { + paths: { + "/video/**": {} + } + } }; if (tokenOptions?.role) { diff --git a/packages/video/package.json b/packages/video/package.json index 7740fa8b..29bdbbfa 100644 --- a/packages/video/package.json +++ b/packages/video/package.json @@ -1,6 +1,6 @@ { "name": "@vonage/video", - "version": "1.3.0", + "version": "1.4.0", "description": "Package to interact with the Vonage Video API (Not OpenTok Compatible)", "keywords": [ "vonage",