diff --git a/static/api/fishjam-server-openapi.yaml b/static/api/fishjam-server-openapi.yaml index ad15c77..c037adc 100644 --- a/static/api/fishjam-server-openapi.yaml +++ b/static/api/fishjam-server-openapi.yaml @@ -120,6 +120,17 @@ components: type: string title: StreamConfig type: object + MoqToken: + description: Token for authorizing a MoQ relay connection + properties: + token: + description: JWT token for MoQ relay + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb290IjoiZmlzaGphbSIsInB1dCI6WyJteS1zdHJlYW0iXSwiZ2V0IjpbXSwiaWF0IjoxNzEzMzYwMDAwLCJleHAiOjE3MTMzNjM2MDB9.abc123 + type: string + required: + - token + title: MoqToken + type: object Error: description: Error message properties: @@ -271,6 +282,22 @@ components: - inputId title: TrackForwardingInfo type: object + MoqTokenConfig: + additionalProperties: false + description: MoQ token configuration + properties: + publishPath: + description: Path under the root the token grants publish access to + example: my-stream + nullable: true + type: string + subscribePath: + description: Path under the root the token grants subscribe access to + example: my-stream + nullable: true + type: string + title: MoqTokenConfig + type: object RoomType: default: conference description: The use-case of the room. If not provided, this defaults to conference. @@ -611,7 +638,7 @@ info: You can learn more about our SDKs in our [SDK Docs](http://fishjam.swmansion.com/docs/how-to/backend/server-setup) title: Fishjam API - version: 0.26.4 + version: 0.27.0 openapi: 3.0.0 paths: /livestream: @@ -918,6 +945,48 @@ paths: summary: Delete a viewer tags: - Viewers + /moq/token: + post: + callbacks: {} + description: Issue a short-lived JWT for a Media over QUIC client. + operationId: create_moq_token + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/MoqTokenConfig" + required: false + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/MoqToken" + description: MoQ token successfully created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + description: Invalid request structure + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + description: Unauthorized + "503": + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + description: Service temporarily unavailable + security: + - management_token: [] + summary: Create a MoQ token + tags: + - MoQ /room: get: callbacks: {} @@ -1556,3 +1625,10 @@ tags: Only the `"all"` selector is currently supported, which forwards every active track in the room. name: Track Forwardings + - description: | + Issue short-lived JWT tokens that authorize **Media over QUIC** relay + clients to publish and/or subscribe under a scoped path. + + A token grants access to its `publishPath` and/or `subscribePath` for one + hour; clients must request a fresh token after that window. + name: MoQ diff --git a/static/api/room-manager-openapi.yaml b/static/api/room-manager-openapi.yaml index 264f898..d10e854 100644 --- a/static/api/room-manager-openapi.yaml +++ b/static/api/room-manager-openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: Fishjam Room Manager - version: 0.25.0 + version: 0.27.0 license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 @@ -110,8 +110,12 @@ components: default: "false" description: Determines if livestream is public or private viewerToken: - type: string - description: Token used to authenticate viewer to a livestream + type: object + properties: + token: + type: string + required: + - token streamerTokenResponse: type: object properties: @@ -131,6 +135,17 @@ components: required: - streamerToken - room + moqToken: + type: object + properties: + token: + type: string + required: + - token + streamName: + type: string + minLength: 1 + maxLength: 100 parameters: {} paths: /room-manager: @@ -233,3 +248,51 @@ paths: text/plain: schema: $ref: "#/components/schemas/errorResponse" + /room-manager/moq/{streamName}/publisher: + get: + summary: Get publisher token for a MoQ stream + operationId: publisherToken + security: [] + parameters: + - schema: + $ref: "#/components/schemas/streamName" + required: true + name: streamName + in: path + responses: + "200": + description: Get MoQ publisher token + content: + application/json: + schema: + $ref: "#/components/schemas/moqToken" + default: + description: Failed to get MoQ publisher token + content: + text/plain: + schema: + $ref: "#/components/schemas/errorResponse" + /room-manager/moq/{streamName}/subscriber: + get: + summary: Get subscriber token for a MoQ stream + operationId: subscriberToken + security: [] + parameters: + - schema: + $ref: "#/components/schemas/streamName" + required: true + name: streamName + in: path + responses: + "200": + description: Get MoQ subscriber token + content: + application/json: + schema: + $ref: "#/components/schemas/moqToken" + default: + description: Failed to get MoQ subscriber token + content: + text/plain: + schema: + $ref: "#/components/schemas/errorResponse"