feat(controlled): 实现设备激活与安全认证流程
- 添加API客户端、加密存储和provision/token激活逻辑 - WebSocket改用Bearer令牌认证,移除REGISTER请求 - 设备ID改为服务端下发,支持令牌刷新和强制下线处理 - 新增deviceSecret加密存储和accessToken自动刷新 - 更新设备ID获取方式为出厂SN,添加安全存储依赖
This commit is contained in:
@@ -21,6 +21,9 @@ android {
|
||||
targetSdk 34
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
// 服务端地址(信令 wss 与 HTTP api 同源)。部署时通过 flavor / CI 注入真实值。
|
||||
buildConfigField "String", "API_BASE", "\"https://www.ttstd.com\""
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
@@ -145,4 +148,6 @@ dependencies {
|
||||
implementation 'com.google.code.gson:gson:2.10.1'
|
||||
// Protobuf(DataChannel 控制指令二进制)
|
||||
implementation 'com.google.protobuf:protobuf-java:3.25.1'
|
||||
// 安全存储:加密 SharedPreferences(保存 accessToken / refreshToken)
|
||||
implementation 'androidx.security:security-crypto:1.1.0-alpha06'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user