博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
JWT Claims
阅读量:4967 次
发布时间:2019-06-12

本文共 2503 字,大约阅读时间需要 8 分钟。

JWT Claims

“iss” (issuer)  发行人

“sub” (subject)  主题

“aud” (audience) 接收方 用户

“exp” (expiration time) 到期时间

“nbf” (not before)  在此之前不可用

“iat” (issued at)  jwt的签发时间

“jti” (JWT ID)  jwt的唯一身份标识,主要用来作为一次性token,从而回避重放攻击。

///   ///   JSON Web Token (JWT) claims set.  ///   TJWTClaims = class(TJOSEBase)  private    const AUDIENCE_SEPARATOR = ',';  private    function GetAudience: string;    function GetExpiration: TDateTime;    function GetIssuedAt: TDateTime;    function GetIssuer: string;    function GetJWTId: string;    function GetNotBefore: TDateTime;    function GetSubject: string;    procedure SetAudience(Value: string);    procedure SetExpiration(Value: TDateTime);    procedure SetIssuedAt(Value: TDateTime);    procedure SetIssuer(Value: string);    procedure SetJWTId(Value: string);    procedure SetNotBefore(Value: TDateTime);    procedure SetSubject(Value: string);    function GetHasAudience: Boolean;    function GetHasExpiration: Boolean;    function GetHasIssuedAt: Boolean;    function GetHasIssuer: Boolean;    function GetHasJWTId: Boolean;    function GetHasNotBefore: Boolean;    function GetHasSubject: Boolean;    function ClaimExists(const AClaimName: string): Boolean;    function GetAudienceArray: TArray
; procedure SetAudienceArray(const Value: TArray
); public constructor Create; virtual; procedure SetClaimOfType
(const AName: string; const AValue: T); function GenerateJWTId(ANumberOfBytes: Integer = 16): string; property Audience: string read GetAudience write SetAudience; property AudienceArray: TArray
read GetAudienceArray write SetAudienceArray; property HasAudience: Boolean read GetHasAudience; property Expiration: TDateTime read GetExpiration write SetExpiration; property HasExpiration: Boolean read GetHasExpiration; property IssuedAt: TDateTime read GetIssuedAt write SetIssuedAt; property HasIssuedAt: Boolean read GetHasIssuedAt; property Issuer: string read GetIssuer write SetIssuer; property HasIssuer: Boolean read GetHasIssuer; property JWTId: string read GetJWTId write SetJWTId; property HasJWTId: Boolean read GetHasJWTId; property NotBefore: TDateTime read GetNotBefore write SetNotBefore; property HasNotBefore: Boolean read GetHasNotBefore; property Subject: string read GetSubject write SetSubject; property HasSubject: Boolean read GetHasSubject; end;

  

 

转载于:https://www.cnblogs.com/hnxxcxg/p/11367704.html

你可能感兴趣的文章
思维(数学)
查看>>
图论3 二分图匹配
查看>>
linux 相关命令
查看>>
SQL字符串传参
查看>>
前端基本功之居中
查看>>
oracle 中导出系统中现有rdbms_jobs中的脚本及schedules job的创建
查看>>
PintJS – 轻量,并发的 GruntJS 运行器
查看>>
jQuery Mapael – 呈现动态的矢量地图
查看>>
Subtle Patterns:网页纹理素材精品免费下载
查看>>
数据、信息与知识、思想之间的关联
查看>>
C++ 格式化输出 及 输入 流
查看>>
转-linux误删文件恢复
查看>>
black box黑盒测试
查看>>
hdu 2457 DNA repair
查看>>
hdu 4427 Math Magic
查看>>
第八周作业
查看>>
react 返回上一页
查看>>
oracle闪回使用以及删除存储过程恢复
查看>>
Box2d引擎之元素
查看>>
JS屏蔽Flash右键菜单
查看>>