Initial commit
This commit is contained in:
36
renren-api/src/main/java/io/renren/service/TokenService.java
Normal file
36
renren-api/src/main/java/io/renren/service/TokenService.java
Normal file
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* Copyright (c) 2018 人人开源 All rights reserved.
|
||||
*
|
||||
* https://www.renren.io
|
||||
*
|
||||
* 版权所有,侵权必究!
|
||||
*/
|
||||
|
||||
package io.renren.service;
|
||||
|
||||
import io.renren.common.service.BaseService;
|
||||
import io.renren.entity.TokenEntity;
|
||||
|
||||
/**
|
||||
* 用户Token
|
||||
*
|
||||
* @author Mark sunlightcs@gmail.com
|
||||
*/
|
||||
public interface TokenService extends BaseService<TokenEntity> {
|
||||
|
||||
TokenEntity getByToken(String token);
|
||||
|
||||
/**
|
||||
* 生成token
|
||||
* @param userId 用户ID
|
||||
* @return 返回token信息
|
||||
*/
|
||||
TokenEntity createToken(Long userId);
|
||||
|
||||
/**
|
||||
* 设置token过期
|
||||
* @param userId 用户ID
|
||||
*/
|
||||
void expireToken(Long userId);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user