2026-06-24 f4bd1f3c89d906131495a0aca5aaf82966378510
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package cn.iocoder.yudao.module.iot.gateway.service.auth;
 
import cn.iocoder.yudao.module.iot.core.topic.IotDeviceIdentity;
 
/**
 * IoT 设备 Token Service 接口
 *
 * @author 芋道源码
 */
public interface IotDeviceTokenService {
 
    /**
     * 创建设备 Token
     *
     * @param productKey 产品 Key
     * @param deviceName 设备名称
     * @return 设备 Token
     */
    String createToken(String productKey, String deviceName);
 
    /**
     * 验证设备 Token
     *
     * @param token 设备 Token
     * @return 设备信息
     */
    IotDeviceIdentity verifyToken(String token);
 
    /**
     * 解析用户名
     *
     * @param username 用户名
     * @return 设备信息
     */
    IotDeviceIdentity parseUsername(String username);
 
}