@hz-9/a5-authn
Version:
Authentication module for the @hz-9/a5-* series of repositories.
47 lines (46 loc) • 784 B
TypeScript
/**
* 用户身份载荷信息
*
* 用于在认证过程中传递用户基本信息
*
* @public
*/
export interface A5AuthnUserPayloadBo {
id: string;
[key: string]: unknown;
}
/**
* JWT 令牌载荷信息
*
* 符合 JWT 标准的载荷数据结构
*
* @public
*/
export interface A5AuthnJwtPayloadBo {
sub: string;
[key: string]: unknown;
}
/**
* 当前用户信息载荷
*
* 用于返回当前登录用户的信息
*
* @public
*/
export interface A5AuthnMePayloadBo {
id: string;
[key: string]: unknown;
}
/**
* 认证令牌对
*
* 包含访问令牌和刷新令牌的完整信息
*
* @public
*/
export interface A5AuthTokenPairBo {
accessToken: string;
refreshToken: string;
tokenType: 'Bearer';
expiresIn: number;
}