public class IoTCredentialData
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.lang.String |
identity
iot 用户唯一身份标识
|
java.lang.String |
iotToken
临时令牌,对请求做身份校验
|
long |
iotTokenCreateTime
iotToken 创建时间,标准Unix时间戳
|
long |
iotTokenExpireTime
iotToken失效时间 -- 时间与云端同步,单位为秒
|
java.lang.String |
refreshToken
refreshToken ,用于刷新 iotToken
|
long |
refreshTokenCreateTime
refreshToken 创建时间,标准Unix时间戳
|
long |
refreshTokenExpireTime
refreshToken失效时间 -- 时间与云端同步,单位为秒
|
Constructor and Description |
---|
IoTCredentialData() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
清除本地IoTCredential数据
|
boolean |
isIotTokenExpire()
iotToken是否失效,
如果refreshToken已经失效,那么iotToken必然失效
|
boolean |
isRefreshTokenExpire()
refreshToken是否失效
|
java.lang.String |
toString() |
void |
update(JSONObject jsonObject)
更新本地Credentials数据
|
public java.lang.String iotToken
public long iotTokenCreateTime
public long iotTokenExpireTime
public java.lang.String refreshToken
public long refreshTokenCreateTime
public long refreshTokenExpireTime
public java.lang.String identity
public boolean isIotTokenExpire()
public boolean isRefreshTokenExpire()
public void clear()
public void update(JSONObject jsonObject)
jsonObject
- 需要保存的Credentials数据,格式为org.json.JSONObjectpublic java.lang.String toString()
toString
in class java.lang.Object