chen.lin
2 天以前 9140aee230de0ef41de9682a9353fbd372e2bcaa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package com.vincent.rsf.openApi.service;
 
/**
 * 对接协议 8.1 Token 签发与校验
 */
public interface TokenService {
 
    /**
     * 校验 appId+appSecret 并签发 token,有效期 1 小时
     * @param appId 应用编码
     * @param appSecret 应用秘钥
     * @return token 字符串,失败返回 null
     */
    String issueToken(String appId, String appSecret);
 
    /**
     * 校验 token 是否有效
     */
    boolean validateToken(String token);
}