Skip to content

Latest commit

 

History

History
85 lines (82 loc) · 915 Bytes

design.md

File metadata and controls

85 lines (82 loc) · 915 Bytes

API

Add new app

POST /agora/app
{
    "appId": "",
    "appCert": "",
    "expirationTimeInSec": 600
}
{
    "success": true
}

Generate new token for app

POST /agora/token
{
    "appId": "required",
    "uid": "",
    "channelName": "",
    "role": 1
}
{
    "token": "result"
}

Allow user access to app

POST /agora/allowance
{
    "email": "",
    "appId": ""
}

Revoke user access to app

DELETE /agora/allowance
{
    "email": "",
    "appId": ""
}

Check user has access to app

POST /agora/allowance/check
{
    "email": "",
    "appId": ""
}

result:

{
  "result": true
}

or

{
  "result": false
}

List users (with allowed apps)

GET /agora/allowance/user
[
  {
    "email": "[email protected]",
    "appIds": ["aaa1", "aaa2"]
  },
  {
    "email": "[email protected]",
    "appIds": ["bbb1"]
  }
]