unjwt 0.5.31 → 0.5.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/adapters/h3.d.mts
CHANGED
|
@@ -8,7 +8,7 @@ import { H3Event } from 'h3';
|
|
|
8
8
|
import { c as JWSSignOptions } from '../shared/unjwt.BsLgL0DQ.mjs';
|
|
9
9
|
export { d as deriveJWKFromPassword, e as exportJWKToPEM, g as generateJWK, i as importJWKFromPEM } from '../shared/unjwt.BjP_dGnX.mjs';
|
|
10
10
|
|
|
11
|
-
interface SessionClaims extends Required<Pick<JWTClaims, "jti" | "iat">>,
|
|
11
|
+
interface SessionClaims extends Required<Pick<JWTClaims, "jti" | "iat">>, StrictOmit<JWTClaims, "jti" | "iat"> {
|
|
12
12
|
}
|
|
13
13
|
type SessionData<T extends Record<string, any> = SessionClaims> = StrictOmit<T, "jti" | "iat" | "exp">;
|
|
14
14
|
type SessionUpdate<T extends Record<string, any> = SessionClaims> = Partial<SessionData<T>> | ((oldData: SessionData<T>) => Partial<SessionData<T>> | undefined);
|
|
@@ -18,8 +18,8 @@ interface SessionManager<T extends Record<string, any> = SessionClaims, ConfigMa
|
|
|
18
18
|
readonly expiresAt: ConfigMaxAge extends ExpiresIn ? number : "exp" extends keyof T ? T["exp"] : number | undefined;
|
|
19
19
|
readonly data: SessionData<T>;
|
|
20
20
|
readonly token: string | undefined;
|
|
21
|
-
update: (update: SessionUpdate<T>) => Promise<SessionManager<T>>;
|
|
22
|
-
clear: () => Promise<SessionManager<T>>;
|
|
21
|
+
update: (update: SessionUpdate<T>) => Promise<SessionManager<T, ConfigMaxAge>>;
|
|
22
|
+
clear: () => Promise<SessionManager<T, ConfigMaxAge>>;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
/**
|
package/dist/adapters/h3v2.d.mts
CHANGED
|
@@ -8,7 +8,7 @@ import { CookieSerializeOptions } from 'cookie-es';
|
|
|
8
8
|
import { c as JWSSignOptions } from '../shared/unjwt.BsLgL0DQ.mjs';
|
|
9
9
|
export { d as deriveJWKFromPassword, e as exportJWKToPEM, g as generateJWK, i as importJWKFromPEM } from '../shared/unjwt.BjP_dGnX.mjs';
|
|
10
10
|
|
|
11
|
-
interface SessionClaims extends Required<Pick<JWTClaims, "jti" | "iat">>,
|
|
11
|
+
interface SessionClaims extends Required<Pick<JWTClaims, "jti" | "iat">>, StrictOmit<JWTClaims, "jti" | "iat"> {
|
|
12
12
|
}
|
|
13
13
|
type SessionData<T extends Record<string, any> = SessionClaims> = StrictOmit<T, "jti" | "iat" | "exp">;
|
|
14
14
|
type SessionUpdate<T extends Record<string, any> = SessionClaims> = Partial<SessionData<T>> | ((oldData: SessionData<T>) => Partial<SessionData<T>> | undefined);
|
|
@@ -18,8 +18,8 @@ interface SessionManager<T extends Record<string, any> = SessionClaims, ConfigMa
|
|
|
18
18
|
readonly expiresAt: ConfigMaxAge extends ExpiresIn ? number : "exp" extends keyof T ? T["exp"] : number | undefined;
|
|
19
19
|
readonly data: SessionData<T>;
|
|
20
20
|
readonly token: string | undefined;
|
|
21
|
-
update: (update: SessionUpdate<T>) => Promise<SessionManager<T>>;
|
|
22
|
-
clear: () => Promise<SessionManager<T>>;
|
|
21
|
+
update: (update: SessionUpdate<T>) => Promise<SessionManager<T, ConfigMaxAge>>;
|
|
22
|
+
clear: () => Promise<SessionManager<T, ConfigMaxAge>>;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
declare const kGetSessionPromise$1: unique symbol;
|