TokenProtocol 类
任何授权令牌。
构造函数
TokenProtocol(*args, **kwargs)
方法
| is_expired |
检查令牌是否已过期。 |
is_expired
检查令牌是否已过期。
is_expired(buffer_ms: int = 300000) -> bool
参数
| 名称 | 说明 |
|---|---|
|
buffer_ms
|
缓冲时间(默认值 5 分钟)。 默认值: 300000
|
返回
| 类型 | 说明 |
|---|---|
|
如果令牌已过期,则为 True;否则为 False。 |
属性
app_display_name
应用显示名称。
app_id
应用 ID。
expiration
自纪元以来令牌过期(以毫秒为单位)。
from_
活动源自何处。
from_id
活动发送方的 ID。
service_url
要向其发送响应的服务 URL。
tenant_id
租户 ID。