Class VisitorTokenEntity
java.lang.Object
com.bytedesk.core.base.BaseEntity
com.bytedesk.service.visitor_token.VisitorTokenEntity
- All Implemented Interfaces:
Serializable
访客访问令牌,用于访客登录,刷新token,访问api等
默认访客不需要token,此处主要用于需要访客登录的特殊场景
可用于强制用户重新登录,或者刷新token
access_token or refresh_token
授权验证token时,不只是使用jwt解码验证,还需要跟数据库中进行对比,如果token被禁用或者过期,则拒绝访问
存储第三方access_token,refresh_token,过期时间等,微信,qq等第三方授权登录
- Author:
- jackning
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionisValid()voidrefresh(ZonedDateTime newExpiresAt) voidrevoke()Methods inherited from class com.bytedesk.core.base.BaseEntity
getCreatedAtString, getUpdatedAtString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
name
-
description
-
accessVisitorToken
-
refreshVisitorToken
-
type
-
scope
-
expiresAt
-
permanent
-
revoked
-
revokeReason
-
channel
-
clientId
-
device
-
-
Constructor Details
-
VisitorTokenEntity
public VisitorTokenEntity()
-
-
Method Details
-
isValid
-
revoke
public void revoke() -
refresh
-