This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import type { JWTPayload } from "hono/utils/jwt/types";
|
||||
import { decode, verify, type Algorithm } from "jsonwebtoken";
|
||||
import jwkToPem, { type JWK } from "jwk-to-pem";
|
||||
|
||||
@ -44,3 +45,7 @@ export function getTokenUID(token: string): string | null {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
export function getTokenData(token: string): JWTPayload {
|
||||
return decode(token) as JWTPayload;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user