@topgroup/diginext
Version:
A BUILD SERVER & CLI to deploy apps to any Kubernetes clusters.
56 lines • 1.4 kB
TypeScript
import type { AccessTokenInfo } from "../../entities";
export type JWTOptions = {
workspaceId?: string;
expiresIn?: string | number;
};
export interface TokenDetails {
id: string;
workspaceId: string;
iat: number;
exp: number;
isExpired: boolean;
expToNow: string;
expiredTimestamp: number;
expiredDate: Date;
expiredDateGTM7: string;
}
export declare const verifyRefreshToken: (refreshToken: string) => Promise<{
error: boolean;
message: string;
tokenDetails?: undefined;
} | {
error: boolean;
tokenDetails: {
id: string;
workspaceId: string;
isExpired: boolean;
};
message?: undefined;
}>;
export declare const generateRefreshToken: (userId: string, options?: {
workspaceId?: string;
expiresIn?: string;
}) => string;
export declare const generateJWT: (userId: string, options?: {
expiresIn?: string;
workspaceId?: string;
}) => Promise<{
accessToken: string;
refreshToken: string;
}>;
export declare function extractAccessTokenInfo(tokens: {
access_token: string;
refresh_token?: string;
}, payload: {
id: string;
exp: number;
workspaceId?: string;
}): Promise<{
isExpired: boolean;
token?: undefined;
} | {
token: AccessTokenInfo;
isExpired: boolean;
}>;
export declare const jwtStrategy: any;
//# sourceMappingURL=jwtStrategy.d.ts.map