|
PHPSDK
|
Public 成员函数 | |
| __construct ( $appKey, $clientIdOrAppID, $clientSecretOrAppCertificate, $expireTimeInSeconds=2592000, $isAgora=false, $uuid='') | |
| 构造方法 更多... | |
| getUserToken ($username, $password=null, $expireInSeconds=3600, $configuration=null) | |
| 获取用户 token 更多... | |
授权类 @final
| Easemob\Auth::__construct | ( | $appKey, | |
| $clientIdOrAppID, | |||
| $clientSecretOrAppCertificate, | |||
$expireTimeInSeconds = 2592000, |
|||
$isAgora = false, |
|||
$uuid = '' |
|||
| ) |
构造方法
| string | $appKey | APP 的唯一标识,规则是 ${org_name}#${app_name} |
| string | $clientIdOrAppID | 环信 App 的 client_id 或者声网 App ID,由 boolean $isAgora 决定 |
| string | $clientSecretOrAppCertificate | 环信 App 的 client_secret 或者 声网 App 证书,由 boolean $isAgora 决定 |
| int | $expireTimeInSeconds | token 有效期,单位(秒) |
| mixed | $proxy | 代理信息 |
| boolean | $isAgora | 是否使用声网 token 初始化 |
| string | $uuid | 环信用户 uuid |
| Easemob\Auth::getUserToken | ( | $username, | |
$password = null, |
|||
$expireInSeconds = 3600, |
|||
$configuration = null |
|||
| ) |
获取用户 token
| string | $username | 环信 IM 用户名,或者 uuid |
| string | $password | 环信用户密码,传递时获取 Easemob userToken 否则获取 Agora userToken |
| int | $expireInSeconds | token 过期时间,单位:s |
| array | $configuration | privileges |