@hz-9/a5-authn
Version:
Authentication module for the @hz-9/a5-* series of repositories.
13 lines (12 loc) • 567 B
TypeScript
import { A5AuthTokenPairBo, A5AuthnJwtPayloadBo, A5AuthnMePayloadBo, A5AuthnUserPayloadBo } from '../../interfaces/auth';
export interface A5AuthnJwtService {
logout(user: A5AuthnUserPayloadBo): Promise<void>;
me(user: A5AuthnUserPayloadBo): Promise<A5AuthnMePayloadBo>;
refreshToken(refreshToken: string): Promise<A5AuthTokenPairBo>;
/**
* 根据 JWT payload 转换为 User Payload
* @param payload JWT payload
* @returns 用户信息
*/
jwtPayloadToUserPayload(payload: A5AuthnJwtPayloadBo): Promise<A5AuthnUserPayloadBo>;
}