Class VisitorTokenEntity

java.lang.Object
com.bytedesk.core.base.BaseEntity
com.bytedesk.service.visitor_token.VisitorTokenEntity
All Implemented Interfaces:
Serializable

@Entity public class VisitorTokenEntity extends BaseEntity
访客访问令牌,用于访客登录,刷新token,访问api等 默认访客不需要token,此处主要用于需要访客登录的特殊场景 可用于强制用户重新登录,或者刷新token access_token or refresh_token 授权验证token时,不只是使用jwt解码验证,还需要跟数据库中进行对比,如果token被禁用或者过期,则拒绝访问 存储第三方access_token,refresh_token,过期时间等,微信,qq等第三方授权登录
Author:
jackning
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • name

      private String name
    • description

      private String description
    • accessVisitorToken

      private String accessVisitorToken
    • refreshVisitorToken

      private String refreshVisitorToken
    • type

      private String type
    • scope

      private List<String> scope
    • expiresAt

      private ZonedDateTime expiresAt
    • permanent

      private Boolean permanent
    • revoked

      private Boolean revoked
    • revokeReason

      private String revokeReason
    • channel

      private String channel
    • clientId

      private String clientId
    • device

      private String device
  • Constructor Details

    • VisitorTokenEntity

      public VisitorTokenEntity()
  • Method Details

    • isValid

      public Boolean isValid()
    • revoke

      public void revoke()
    • refresh

      public void refresh(ZonedDateTime newExpiresAt)