Interface NEAuthService
-
- All Implemented Interfaces:
-
com.netease.yunxin.kit.roomkit.api.service.NEBaseService
public interface NEAuthService implements NEBaseService
用户鉴权服务
-
-
Method Summary
Modifier and Type Method Description abstract Unit
login(String account, String token, NECallback<Unit> callback)
实名登录 abstract Unit
loginByIM(String account, String staticToken, String dynamicToken, NERoomIMAuthType imAuthType, NECallback<Unit> callback)
IM账号登录 abstract Unit
loginByDynamicToken(String account, String token, NECallback<Unit> callback)
动态token登录 abstract Unit
loginByDynamicToken(String account, String token, String authType, NECallback<Unit> callback)
动态token登录 abstract Unit
renewToken(String token, NECallback<Unit> callback)
token校验。针对动态token登录,token过期后更新token abstract Unit
logout(NECallback<Unit> callback)
退出登录 abstract Unit
addAuthListener(NEAuthListener listener)
添加鉴权事件监听 abstract Unit
removeAuthListener(NEAuthListener listener)
移除鉴权事件监听 abstract Boolean
isLoggedIn()
查询当前登录状态 -
-
Method Detail
-
login
abstract Unit login(String account, String token, NECallback<Unit> callback)
实名登录
- Parameters:
account
- NERoom账号token
- NERoom Tokencallback
- 回调
-
loginByIM
abstract Unit loginByIM(String account, String staticToken, String dynamicToken, NERoomIMAuthType imAuthType, NECallback<Unit> callback)
IM账号登录
- Parameters:
account
- IM账号staticToken
- IM 静态TokendynamicToken
- IM 动态TokenimAuthType
- IM 认证方式callback
- 回调
-
loginByDynamicToken
abstract Unit loginByDynamicToken(String account, String token, NECallback<Unit> callback)
动态token登录
- Parameters:
account
- IM账号token
- 动态tokencallback
- NECallback<Unit>
-
loginByDynamicToken
abstract Unit loginByDynamicToken(String account, String token, String authType, NECallback<Unit> callback)
动态token登录
- Parameters:
account
- IM账号token
- 动态tokenauthType
- 鉴权类型callback
- NECallback<Unit>
-
renewToken
abstract Unit renewToken(String token, NECallback<Unit> callback)
token校验。针对动态token登录,token过期后更新token
- Parameters:
token
- 动态tokencallback
- NECallback<Unit>
-
logout
abstract Unit logout(NECallback<Unit> callback)
退出登录
- Parameters:
callback
- 回调
-
addAuthListener
abstract Unit addAuthListener(NEAuthListener listener)
添加鉴权事件监听
- Parameters:
listener
- 鉴权服务监听
-
removeAuthListener
abstract Unit removeAuthListener(NEAuthListener listener)
移除鉴权事件监听
- Parameters:
listener
- 鉴权服务监听
-
isLoggedIn
abstract Boolean isLoggedIn()
查询当前登录状态
-
-
-
-