Skip to content

Releases: iamriajul/agora-token-service-docker

v1.5.0

20 May 06:32
Compare
Choose a tag to compare

What's Changed

Full Changelog: AgoraIO-Community/agora-token-service@v1.4.4...v1.5

v1.4.4

12 Dec 10:02
Compare
Choose a tag to compare

Re-added ping/pong health check.

v1.4.3

22 Aug 05:16
Compare
Choose a tag to compare

v1.4.2

17 Aug 14:25
Compare
Choose a tag to compare

Added CORS control, this helps determine which origins are permitted to access the resources of your application.

v1.4.1

17 Aug 12:43
Compare
Choose a tag to compare

Changes Made

  • Added a new function "getToken" to the Service struct to handle the "getToken" endpoint (POST requests).
  • Implemented logic to parse the request body into a TokenRequest struct to process token generation requests.
  • Implemented functions to generate RTC tokens, RTM tokens, and chat tokens based on the TokenRequest.
  • updated to go-tokenbuilder 1.3.0, which gives streamtokens with rtm if channel name is provided.

New Endpoint Details

Endpoint: /getToken

HTTP Method: POST

Request Payload:

{
  "tokenType": "rtc",       // The token type: "rtc", "rtm", or "chat"
  "channel": "channel123",  // The channel name (used for RTC and RTM tokens)
  "role": "publisher",      // The role of the user for RTC tokens (publisher or subscriber)
  "uid": "123",         // The user ID or account (used for RTC, RTM, and some chat tokens)
  "expire": 3600            // The token expiration time in seconds (used for all token types)
}

Response

Upon successful generation of the token, the API will respond with an HTTP status code of 200 OK, and the response body will contain the token in a JSON key "token".

{
  "token": "007hbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhZG1pbiIsInN1YiI6InVzZXIxMjMiLCJpYXQiOjE2MzEwNTU4NzIsImV4cCI6MTYzMTA1OTQ3Mn0.3eJ-RGwIl2ANFbdv4SeHtWzGiv6PpC3i0UqXlHfsqEw"
}

If there are validation errors in the request or issues during token generation, the endpoint responds with an appropriate error message and the corresponding status code.


AgoraIO-Community/agora-token-service#38

Full Changelog: AgoraIO-Community/agora-token-service@v1.4.0...v1.4.1

v1.4.0

17 Aug 12:41
Compare
Choose a tag to compare

To use chat tokens:

endpoint structure

  • app privileges: chat/app/?expiry=3600
  • user privileges: /chat/account/:chatid/?expiry=3600

expiry is an optional parameter for both.

response:

{
  "chatToken":"007chat-token-djfkaljdla"
} 

v1.3.0

17 Aug 12:34
Compare
Choose a tag to compare

Tokens now compatible with Signaling (RTM 2)

Tokens are backwards compatible.

v1.1.1

17 Aug 12:33
Compare
Choose a tag to compare

Changelog

  • 794df04 Merge pull request #21 from AgoraIO-Community/build-releases

v1.0.0

17 Aug 12:11
Compare
Choose a tag to compare
fix: integration.