mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-04-29 04:00:09 +00:00
Initial commit of eigent-main
This commit is contained in:
commit
723df5a03e
1144 changed files with 103478 additions and 0 deletions
44
package/@stackframe/stack-shared/dist/utils/jwt.d.ts
vendored
Normal file
44
package/@stackframe/stack-shared/dist/utils/jwt.d.ts
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
import * as jose from 'jose';
|
||||
|
||||
declare function legacySignGlobalJWT(issuer: string, payload: any, expirationTime?: string): Promise<string>;
|
||||
declare function legacyVerifyGlobalJWT(issuer: string, jwt: string): Promise<jose.JWTPayload>;
|
||||
declare function signJWT(options: {
|
||||
issuer: string;
|
||||
audience: string;
|
||||
payload: any;
|
||||
expirationTime?: string;
|
||||
}): Promise<string>;
|
||||
declare function verifyJWT(options: {
|
||||
issuer: string;
|
||||
jwt: string;
|
||||
}): Promise<jose.JWTPayload>;
|
||||
type PrivateJwk = {
|
||||
kty: "EC";
|
||||
alg: "ES256";
|
||||
crv: "P-256";
|
||||
kid: string;
|
||||
d: string;
|
||||
x: string;
|
||||
y: string;
|
||||
};
|
||||
declare function getPrivateJwk(secret: string): Promise<PrivateJwk>;
|
||||
type PublicJwk = {
|
||||
kty: "EC";
|
||||
alg: "ES256";
|
||||
crv: "P-256";
|
||||
kid: string;
|
||||
x: string;
|
||||
y: string;
|
||||
};
|
||||
declare function getPublicJwkSet(secretOrPrivateJwk: string | PrivateJwk): Promise<{
|
||||
keys: PublicJwk[];
|
||||
}>;
|
||||
declare function getPerAudienceSecret(options: {
|
||||
audience: string;
|
||||
secret: string;
|
||||
}): string;
|
||||
declare function getKid(options: {
|
||||
secret: string;
|
||||
}): string;
|
||||
|
||||
export { type PrivateJwk, type PublicJwk, getKid, getPerAudienceSecret, getPrivateJwk, getPublicJwkSet, legacySignGlobalJWT, legacyVerifyGlobalJWT, signJWT, verifyJWT };
|
||||
Loading…
Add table
Add a link
Reference in a new issue