njenga55/agora
最新稳定版本:v1
Composer 安装命令:
composer require njenga55/agora
包简介
Agora laravel package
README 文档
README
generate server side tokens for agora in laravel.
installation:
installation via composer.
composer require njenga55/agora
Usage:
Laravel
Generate sdk token
Agora::sdkToken();
Generate Room token
Agora::roomToken();
Generate Task token
Agora::taskToken();
In some cases, as documented on the agora documentation, you might want to change the ability of your tokens. To set the context from which you want to generate ur access token from use
Agora::setToken();
Agora::setContext([
'role' => 'ADMINROLE',
'uuid' => 'some-uuid-value-here-especially-for-tasks-and-room'
])
where role can be either ADMINROLE, WRITEROLE or READERROLE
then followed by either roomToken() or taskToken()
$token = Agora::setContext([
'role' => 'ADMINROLE',
'uuid' => 'some-room--uuid'
])->roomToken()
$token = Agora::setContext([
'role' => 'ADMINROLE',
'uuid' => 'some-task--uuid'
])->taskToken()
Licence:
MIT
统计信息
- 总下载量: 19
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-05-30