Use appKey in license SDK requests

这个提交包含在:
XuqmGroup 2026-05-15 21:42:27 +08:00
父节点 2577d6e3e2
当前提交 e81bf89697
共有 3 个文件被更改,包括 5 次插入5 次删除

查看文件

@ -85,7 +85,7 @@ val deviceId = LicenseSDK.getDeviceId()
| Parameter | Default | Description | | Parameter | Default | Description |
|-----------|---------|-------------| |-----------|---------|-------------|
| `appKey` | from encrypted file | Company appKey from tenant platform | | `appKey` | from encrypted file | AppKey from tenant platform |
| `deviceName` | `${MANUFACTURER} ${MODEL}` | Device display name | | `deviceName` | `${MANUFACTURER} ${MODEL}` | Device display name |
| `baseUrl` | `https://auth.dev.xuqinmin.com/` | License server base URL | | `baseUrl` | `https://auth.dev.xuqinmin.com/` | License server base URL |

查看文件

@ -109,7 +109,7 @@ object LicenseSDK {
// Try to verify existing token // Try to verify existing token
val result = apiService.verify( val result = apiService.verify(
VerifyRequest( VerifyRequest(
companyId = config.appKey, appKey = config.appKey,
deviceId = deviceId, deviceId = deviceId,
token = token, token = token,
userInfo = userInfo, userInfo = userInfo,
@ -128,7 +128,7 @@ object LicenseSDK {
// No token or token invalid, register new device // No token or token invalid, register new device
val result = apiService.register( val result = apiService.register(
RegisterRequest( RegisterRequest(
companyId = config.appKey, appKey = config.appKey,
deviceId = deviceId, deviceId = deviceId,
deviceName = config.deviceName, deviceName = config.deviceName,
deviceModel = DeviceInfoProvider.getDeviceModel(), deviceModel = DeviceInfoProvider.getDeviceModel(),

查看文件

@ -3,7 +3,7 @@ package com.xuqm.sdk.license.model
import com.google.gson.annotations.SerializedName import com.google.gson.annotations.SerializedName
data class RegisterRequest( data class RegisterRequest(
@SerializedName("companyId") val companyId: String, @SerializedName("appKey") val appKey: String,
@SerializedName("deviceId") val deviceId: String, @SerializedName("deviceId") val deviceId: String,
@SerializedName("deviceName") val deviceName: String? = null, @SerializedName("deviceName") val deviceName: String? = null,
@SerializedName("deviceModel") val deviceModel: String? = null, @SerializedName("deviceModel") val deviceModel: String? = null,
@ -19,7 +19,7 @@ data class RegisterResponse(
) )
data class VerifyRequest( data class VerifyRequest(
@SerializedName("companyId") val companyId: String, @SerializedName("appKey") val appKey: String,
@SerializedName("deviceId") val deviceId: String, @SerializedName("deviceId") val deviceId: String,
val token: String, val token: String,
@SerializedName("userInfo") val userInfo: LicenseUserInfo? = null, @SerializedName("userInfo") val userInfo: LicenseUserInfo? = null,