@shware/security 3.3.1 → 3.3.2
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/auth/index.d.cts +2 -3
- package/dist/auth/index.d.cts.map +1 -1
- package/dist/auth/index.d.mts +2 -3
- package/dist/auth/index.d.mts.map +1 -1
- package/dist/auth/types.d.cts +4 -5
- package/dist/auth/types.d.cts.map +1 -1
- package/dist/auth/types.d.mts +4 -5
- package/dist/auth/types.d.mts.map +1 -1
- package/dist/core/index.d.cts +6 -7
- package/dist/core/index.d.cts.map +1 -1
- package/dist/core/index.d.mts +6 -7
- package/dist/core/index.d.mts.map +1 -1
- package/dist/email/schema.d.cts +2 -3
- package/dist/email/schema.d.cts.map +1 -1
- package/dist/email/schema.d.mts +2 -3
- package/dist/email/schema.d.mts.map +1 -1
- package/dist/oauth2/client.d.cts +3 -4
- package/dist/oauth2/client.d.cts.map +1 -1
- package/dist/oauth2/client.d.mts +3 -4
- package/dist/oauth2/client.d.mts.map +1 -1
- package/dist/oauth2/error.d.cts +3 -4
- package/dist/oauth2/error.d.cts.map +1 -1
- package/dist/oauth2/error.d.mts +3 -4
- package/dist/oauth2/error.d.mts.map +1 -1
- package/dist/oauth2/provider/apple-client-secret.d.cts +2 -3
- package/dist/oauth2/provider/apple-client-secret.d.cts.map +1 -1
- package/dist/oauth2/provider/apple-client-secret.d.mts +2 -3
- package/dist/oauth2/provider/apple-client-secret.d.mts.map +1 -1
- package/dist/oauth2/provider/apple.d.cts +6 -7
- package/dist/oauth2/provider/apple.d.cts.map +1 -1
- package/dist/oauth2/provider/apple.d.mts +6 -7
- package/dist/oauth2/provider/apple.d.mts.map +1 -1
- package/dist/oauth2/provider/common.d.cts +5 -6
- package/dist/oauth2/provider/common.d.cts.map +1 -1
- package/dist/oauth2/provider/common.d.mts +5 -6
- package/dist/oauth2/provider/common.d.mts.map +1 -1
- package/dist/oauth2/provider/facebook.d.cts +6 -7
- package/dist/oauth2/provider/facebook.d.cts.map +1 -1
- package/dist/oauth2/provider/facebook.d.mts +6 -7
- package/dist/oauth2/provider/facebook.d.mts.map +1 -1
- package/dist/oauth2/provider/github.d.cts +4 -5
- package/dist/oauth2/provider/github.d.cts.map +1 -1
- package/dist/oauth2/provider/github.d.mts +4 -5
- package/dist/oauth2/provider/github.d.mts.map +1 -1
- package/dist/oauth2/provider/google.d.cts +6 -7
- package/dist/oauth2/provider/google.d.cts.map +1 -1
- package/dist/oauth2/provider/google.d.mts +6 -7
- package/dist/oauth2/provider/google.d.mts.map +1 -1
- package/dist/oauth2/provider/wechat.d.cts +5 -6
- package/dist/oauth2/provider/wechat.d.cts.map +1 -1
- package/dist/oauth2/provider/wechat.d.mts +5 -6
- package/dist/oauth2/provider/wechat.d.mts.map +1 -1
- package/dist/oauth2/provider/x.d.cts +6 -7
- package/dist/oauth2/provider/x.d.cts.map +1 -1
- package/dist/oauth2/provider/x.d.mts +6 -7
- package/dist/oauth2/provider/x.d.mts.map +1 -1
- package/dist/oauth2/types.d.cts +17 -18
- package/dist/oauth2/types.d.cts.map +1 -1
- package/dist/oauth2/types.d.mts +17 -18
- package/dist/oauth2/types.d.mts.map +1 -1
- package/dist/session/common.d.cts +3 -4
- package/dist/session/common.d.cts.map +1 -1
- package/dist/session/common.d.mts +3 -4
- package/dist/session/common.d.mts.map +1 -1
- package/dist/session/db.d.cts +2 -3
- package/dist/session/db.d.cts.map +1 -1
- package/dist/session/db.d.mts +2 -3
- package/dist/session/db.d.mts.map +1 -1
- package/dist/session/map-session.d.cts +1 -2
- package/dist/session/map-session.d.cts.map +1 -1
- package/dist/session/map-session.d.mts +1 -2
- package/dist/session/map-session.d.mts.map +1 -1
- package/dist/session/redis.d.cts +2 -3
- package/dist/session/redis.d.cts.map +1 -1
- package/dist/session/redis.d.mts +2 -3
- package/dist/session/redis.d.mts.map +1 -1
- package/dist/session/types.d.cts +6 -7
- package/dist/session/types.d.cts.map +1 -1
- package/dist/session/types.d.mts +6 -7
- package/dist/session/types.d.mts.map +1 -1
- package/dist/utils/http.d.cts +6 -7
- package/dist/utils/http.d.cts.map +1 -1
- package/dist/utils/http.d.mts +6 -7
- package/dist/utils/http.d.mts.map +1 -1
- package/dist/utils/oauth2.d.cts +1 -2
- package/dist/utils/oauth2.d.cts.map +1 -1
- package/dist/utils/oauth2.d.mts +1 -2
- package/dist/utils/oauth2.d.mts.map +1 -1
- package/dist/utils/timing.d.cts +1 -2
- package/dist/utils/timing.d.cts.map +1 -1
- package/dist/utils/timing.d.mts +1 -2
- package/dist/utils/timing.d.mts.map +1 -1
- package/dist/utils/valid.d.cts +3 -4
- package/dist/utils/valid.d.cts.map +1 -1
- package/dist/utils/valid.d.mts +3 -4
- package/dist/utils/valid.d.mts.map +1 -1
- package/package.json +6 -6
package/dist/auth/index.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import { Principal } from "../core/index.cjs";
|
|
|
2
2
|
import { Session } from "../session/types.cjs";
|
|
3
3
|
import { AuthConfig, AuthService, AuthorizedHandler, LoggedHandler } from "./types.cjs";
|
|
4
4
|
//#region src/auth/index.d.ts
|
|
5
|
-
declare const PATH: {
|
|
5
|
+
export declare const PATH: {
|
|
6
6
|
readonly CSRF: '/csrf';
|
|
7
7
|
readonly LOGOUT: '/logout';
|
|
8
8
|
readonly LOGGED: '/logged';
|
|
@@ -20,7 +20,7 @@ declare const PATH: {
|
|
|
20
20
|
readonly DESKTOP_EXCHANGE: '/auth/desktop/exchange';
|
|
21
21
|
readonly CLEANUP_EXPIRED_SESSIONS: '/sessions/expired/cleanup';
|
|
22
22
|
};
|
|
23
|
-
declare class Auth implements AuthService {
|
|
23
|
+
export declare class Auth implements AuthService {
|
|
24
24
|
private readonly timing;
|
|
25
25
|
private readonly cookieName;
|
|
26
26
|
private readonly cookieOptions;
|
|
@@ -105,5 +105,4 @@ declare class Auth implements AuthService {
|
|
|
105
105
|
cleanupExpiredSessions: (cleanupCount?: number) => Promise<Response>;
|
|
106
106
|
}
|
|
107
107
|
//#endregion
|
|
108
|
-
export { Auth, PATH };
|
|
109
108
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/auth/index.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/auth/index.ts"],"mappings":";;;;qBAyCa;WACX;WACA;WACA;WAEA;WACA;WACA;WACA;WACA;WACA;WAEA;WACA;WACA;WACA;WASA;WACA;WAEA;;qBAGW,gBAAgB;mBACV;mBACA;mBACA;mBACA;mBACA;mBACA;mBACA;mBACA;EAEjB,cACE,mBACA,cACA,oBACA,QACA,QACA,UACC;UAiBK;EAYR,OAAI,UAAoB,YAAU,QAAQ;EAmB1C,SAAM,SAAmB,YAAU,QAAQ;EAQ3C,SAAM,SAAmB,SAAO,WAAa,kBAAgB,QAAQ;UAsB7D;UAUA;UAIA;UAIA;UAIA;UAIA;EAIR,cAAW,SAAmB,YAAU,QAAQ;EAOhD,cAAW,SAAmB,YAAU,QAAQ;EAOhD,sBAAmB,SAAmB,YAAU,QAAQ;mBAiCvC;EAQjB,kBAAe,SAAmB,SAAO,SAAW,sBAAoB,QAAQ;EAkFhF,oBAAiB,SAAmB,SAAO,SAAW,sBAAoB,QAAQ;EAuClF,oBAAiB,SACN,SAAO,SACP,mBAAiB,4BAEzB,QAAQ;EAyDX,4BAAyB,SACd,SAAO,SACP;IAAQ;IAAe;QAA+B,kBAC9D,QAAQ;EAqBX,aAAU,SAAmB,SAAO,SAAW,sBAAoB,QAAQ;;;;;;;;;;;;;;;;;;;;EAmD3E,mBAAgB,SAAmB,YAAU,QAAQ;;;;;;;;;;;;;;;;;;;EA0DrD,kBAAe,SAAmB,YAAU,QAAQ;EAgEpD,4BAAyB,UACb,SAAO,UACP;IAAQ;IAAe;QAA+B,kBAC/D,QAAQ;EAIX,aAAU,UAAoB,SAAO,UAAY,sBAAoB,QAAQ;EAI7E,OAAI,WAAqB,cAAY;EAOrC,kBAAe,SAAmB,YAAU;EAU5C,aAAoB,mBAAiB,SAC1B,SAAO,QACR,MACP,QAAQ,iBAAiB,UAAU;EAwBtC,gBAAa,sBAA8B;EAI3C,eAAY,SAAmB,YAAU,QAAQ;EAUjD,eAAY,WAAqB,cAAY,QAAQ;EAKrD,yBAAsB,0BAAkC,QAAQ"}
|
package/dist/auth/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import { Principal } from "../core/index.mjs";
|
|
|
2
2
|
import { Session } from "../session/types.mjs";
|
|
3
3
|
import { AuthConfig, AuthService, AuthorizedHandler, LoggedHandler } from "./types.mjs";
|
|
4
4
|
//#region src/auth/index.d.ts
|
|
5
|
-
declare const PATH: {
|
|
5
|
+
export declare const PATH: {
|
|
6
6
|
readonly CSRF: '/csrf';
|
|
7
7
|
readonly LOGOUT: '/logout';
|
|
8
8
|
readonly LOGGED: '/logged';
|
|
@@ -20,7 +20,7 @@ declare const PATH: {
|
|
|
20
20
|
readonly DESKTOP_EXCHANGE: '/auth/desktop/exchange';
|
|
21
21
|
readonly CLEANUP_EXPIRED_SESSIONS: '/sessions/expired/cleanup';
|
|
22
22
|
};
|
|
23
|
-
declare class Auth implements AuthService {
|
|
23
|
+
export declare class Auth implements AuthService {
|
|
24
24
|
private readonly timing;
|
|
25
25
|
private readonly cookieName;
|
|
26
26
|
private readonly cookieOptions;
|
|
@@ -105,5 +105,4 @@ declare class Auth implements AuthService {
|
|
|
105
105
|
cleanupExpiredSessions: (cleanupCount?: number) => Promise<Response>;
|
|
106
106
|
}
|
|
107
107
|
//#endregion
|
|
108
|
-
export { Auth, PATH };
|
|
109
108
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/auth/index.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/auth/index.ts"],"mappings":";;;;qBAyCa;WACX;WACA;WACA;WAEA;WACA;WACA;WACA;WACA;WACA;WAEA;WACA;WACA;WACA;WASA;WACA;WAEA;;qBAGW,gBAAgB;mBACV;mBACA;mBACA;mBACA;mBACA;mBACA;mBACA;mBACA;EAEjB,cACE,mBACA,cACA,oBACA,QACA,QACA,UACC;UAiBK;EAYR,OAAI,UAAoB,YAAU,QAAQ;EAmB1C,SAAM,SAAmB,YAAU,QAAQ;EAQ3C,SAAM,SAAmB,SAAO,WAAa,kBAAgB,QAAQ;UAsB7D;UAUA;UAIA;UAIA;UAIA;UAIA;EAIR,cAAW,SAAmB,YAAU,QAAQ;EAOhD,cAAW,SAAmB,YAAU,QAAQ;EAOhD,sBAAmB,SAAmB,YAAU,QAAQ;mBAiCvC;EAQjB,kBAAe,SAAmB,SAAO,SAAW,sBAAoB,QAAQ;EAkFhF,oBAAiB,SAAmB,SAAO,SAAW,sBAAoB,QAAQ;EAuClF,oBAAiB,SACN,SAAO,SACP,mBAAiB,4BAEzB,QAAQ;EAyDX,4BAAyB,SACd,SAAO,SACP;IAAQ;IAAe;QAA+B,kBAC9D,QAAQ;EAqBX,aAAU,SAAmB,SAAO,SAAW,sBAAoB,QAAQ;;;;;;;;;;;;;;;;;;;;EAmD3E,mBAAgB,SAAmB,YAAU,QAAQ;;;;;;;;;;;;;;;;;;;EA0DrD,kBAAe,SAAmB,YAAU,QAAQ;EAgEpD,4BAAyB,UACb,SAAO,UACP;IAAQ;IAAe;QAA+B,kBAC/D,QAAQ;EAIX,aAAU,UAAoB,SAAO,UAAY,sBAAoB,QAAQ;EAI7E,OAAI,WAAqB,cAAY;EAOrC,kBAAe,SAAmB,YAAU;EAU5C,aAAoB,mBAAiB,SAC1B,SAAO,QACR,MACP,QAAQ,iBAAiB,UAAU;EAwBtC,gBAAa,sBAA8B;EAI3C,eAAY,SAAmB,YAAU,QAAQ;EAUjD,eAAY,WAAqB,cAAY,QAAQ;EAKrD,yBAAsB,0BAAkC,QAAQ"}
|
package/dist/auth/types.d.cts
CHANGED
|
@@ -3,9 +3,9 @@ import { KVRepository, Session, SessionRepository } from "../session/types.cjs";
|
|
|
3
3
|
import { OAuth2ClientConfig, OAuth2Token, UserInfo } from "../oauth2/types.cjs";
|
|
4
4
|
import { CookieOptions } from "../utils/http.cjs";
|
|
5
5
|
//#region src/auth/types.d.ts
|
|
6
|
-
type LoggedHandler = (principal: Principal) => Promise<void>;
|
|
7
|
-
type AuthorizedHandler = (request: Request, registrationId: string, userInfo: UserInfo, token?: OAuth2Token) => Promise<Principal>;
|
|
8
|
-
interface AuthConfig {
|
|
6
|
+
export type LoggedHandler = (principal: Principal) => Promise<void>;
|
|
7
|
+
export type AuthorizedHandler = (request: Request, registrationId: string, userInfo: UserInfo, token?: OAuth2Token) => Promise<Principal>;
|
|
8
|
+
export interface AuthConfig {
|
|
9
9
|
timing?: boolean;
|
|
10
10
|
kvRepository: KVRepository;
|
|
11
11
|
sessionRepository: SessionRepository;
|
|
@@ -17,7 +17,7 @@ interface AuthConfig {
|
|
|
17
17
|
client?: OAuth2ClientConfig;
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
interface AuthService {
|
|
20
|
+
export interface AuthService {
|
|
21
21
|
csrf: (request: Request) => Promise<Response>;
|
|
22
22
|
logout: (request: Request) => Promise<Response>;
|
|
23
23
|
logged: (request: Request, onLogged?: LoggedHandler) => Promise<Response>;
|
|
@@ -46,5 +46,4 @@ interface AuthService {
|
|
|
46
46
|
cleanupExpiredSessions: (cleanupCount?: number) => Promise<Response>;
|
|
47
47
|
}
|
|
48
48
|
//#endregion
|
|
49
|
-
export { AuthConfig, AuthService, AuthorizedHandler, LoggedHandler };
|
|
50
49
|
//# sourceMappingURL=types.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","names":[],"sources":["../../src/auth/types.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"types.d.cts","names":[],"sources":["../../src/auth/types.ts"],"mappings":";;;;;YAKY,iBAAiB,WAAW,cAAc;YAC1C,qBACV,SAAS,SACT,wBACA,UAAU,UACV,QAAQ,gBACL,QAAQ;iBAEI;EACf;EACA,cAAc;EACd,mBAAmB;EACnB,SAAS;IAAkB;;EAC3B;EACA;IACE,SAAS;;;iBAII;EAEf,OAAO,SAAS,YAAY,QAAQ;EACpC,SAAS,SAAS,YAAY,QAAQ;EACtC,SAAS,SAAS,SAAS,WAAW,kBAAkB,QAAQ;EAGhE,cAAc,SAAS,YAAY,QAAQ;EAC3C,cAAc,SAAS,YAAY,QAAQ;EAC3C,sBAAsB,SAAS,YAAY,QAAQ;EACnD,kBAAkB,SAAS,SAAS,cAAc,sBAAsB,QAAQ;EAChF,oBAAoB,SAAS,SAAS,cAAc,sBAAsB,QAAQ;EAClF,oBACE,SAAS,SACT,cAAc,mBACd,4BACG,QAAQ;EAGb,4BACE,SAAS,SACT,SAAS;IAAQ;IAAe;QAA+B,kBAC5D,QAAQ;EACb,4BACE,SAAS,SACT,SAAS;IAAQ;IAAe;QAA+B,kBAC5D,QAAQ;EAEb,aAAa,SAAS,SAAS,cAAc,sBAAsB,QAAQ;EAC3E,aAAa,SAAS,SAAS,cAAc,sBAAsB,QAAQ;EAG3E,OAAO,WAAW,cAAc;EAChC,kBAAkB,SAAS,YAAY;EACvC,aAAa,mBACX,SAAS,SACT,QAAQ,MACL,QAAQ,iBAAiB,UAAU;EACxC,gBAAgB,sBAAsB;EACtC,eAAe,SAAS,YAAY,QAAQ;EAC5C,eAAe,WAAW,cAAc,QAAQ;EAChD,yBAAyB,0BAA0B,QAAQ"}
|
package/dist/auth/types.d.mts
CHANGED
|
@@ -3,9 +3,9 @@ import { KVRepository, Session, SessionRepository } from "../session/types.mjs";
|
|
|
3
3
|
import { OAuth2ClientConfig, OAuth2Token, UserInfo } from "../oauth2/types.mjs";
|
|
4
4
|
import { CookieOptions } from "../utils/http.mjs";
|
|
5
5
|
//#region src/auth/types.d.ts
|
|
6
|
-
type LoggedHandler = (principal: Principal) => Promise<void>;
|
|
7
|
-
type AuthorizedHandler = (request: Request, registrationId: string, userInfo: UserInfo, token?: OAuth2Token) => Promise<Principal>;
|
|
8
|
-
interface AuthConfig {
|
|
6
|
+
export type LoggedHandler = (principal: Principal) => Promise<void>;
|
|
7
|
+
export type AuthorizedHandler = (request: Request, registrationId: string, userInfo: UserInfo, token?: OAuth2Token) => Promise<Principal>;
|
|
8
|
+
export interface AuthConfig {
|
|
9
9
|
timing?: boolean;
|
|
10
10
|
kvRepository: KVRepository;
|
|
11
11
|
sessionRepository: SessionRepository;
|
|
@@ -17,7 +17,7 @@ interface AuthConfig {
|
|
|
17
17
|
client?: OAuth2ClientConfig;
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
interface AuthService {
|
|
20
|
+
export interface AuthService {
|
|
21
21
|
csrf: (request: Request) => Promise<Response>;
|
|
22
22
|
logout: (request: Request) => Promise<Response>;
|
|
23
23
|
logged: (request: Request, onLogged?: LoggedHandler) => Promise<Response>;
|
|
@@ -46,5 +46,4 @@ interface AuthService {
|
|
|
46
46
|
cleanupExpiredSessions: (cleanupCount?: number) => Promise<Response>;
|
|
47
47
|
}
|
|
48
48
|
//#endregion
|
|
49
|
-
export { AuthConfig, AuthService, AuthorizedHandler, LoggedHandler };
|
|
50
49
|
//# sourceMappingURL=types.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","names":[],"sources":["../../src/auth/types.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"types.d.mts","names":[],"sources":["../../src/auth/types.ts"],"mappings":";;;;;YAKY,iBAAiB,WAAW,cAAc;YAC1C,qBACV,SAAS,SACT,wBACA,UAAU,UACV,QAAQ,gBACL,QAAQ;iBAEI;EACf;EACA,cAAc;EACd,mBAAmB;EACnB,SAAS;IAAkB;;EAC3B;EACA;IACE,SAAS;;;iBAII;EAEf,OAAO,SAAS,YAAY,QAAQ;EACpC,SAAS,SAAS,YAAY,QAAQ;EACtC,SAAS,SAAS,SAAS,WAAW,kBAAkB,QAAQ;EAGhE,cAAc,SAAS,YAAY,QAAQ;EAC3C,cAAc,SAAS,YAAY,QAAQ;EAC3C,sBAAsB,SAAS,YAAY,QAAQ;EACnD,kBAAkB,SAAS,SAAS,cAAc,sBAAsB,QAAQ;EAChF,oBAAoB,SAAS,SAAS,cAAc,sBAAsB,QAAQ;EAClF,oBACE,SAAS,SACT,cAAc,mBACd,4BACG,QAAQ;EAGb,4BACE,SAAS,SACT,SAAS;IAAQ;IAAe;QAA+B,kBAC5D,QAAQ;EACb,4BACE,SAAS,SACT,SAAS;IAAQ;IAAe;QAA+B,kBAC5D,QAAQ;EAEb,aAAa,SAAS,SAAS,cAAc,sBAAsB,QAAQ;EAC3E,aAAa,SAAS,SAAS,cAAc,sBAAsB,QAAQ;EAG3E,OAAO,WAAW,cAAc;EAChC,kBAAkB,SAAS,YAAY;EACvC,aAAa,mBACX,SAAS,SACT,QAAQ,MACL,QAAQ,iBAAiB,UAAU;EACxC,gBAAgB,sBAAsB;EACtC,eAAe,SAAS,YAAY,QAAQ;EAC5C,eAAe,WAAW,cAAc,QAAQ;EAChD,yBAAyB,0BAA0B,QAAQ"}
|
package/dist/core/index.d.cts
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
//#region src/core/index.d.ts
|
|
2
|
-
type JSONValue = null | string | number | boolean | {
|
|
2
|
+
export type JSONValue = null | string | number | boolean | {
|
|
3
3
|
[value: string]: JSONValue;
|
|
4
4
|
} | Array<JSONValue>;
|
|
5
|
-
interface Principal {
|
|
5
|
+
export interface Principal {
|
|
6
6
|
name: string;
|
|
7
7
|
}
|
|
8
|
-
interface Authentication extends Principal {
|
|
8
|
+
export interface Authentication extends Principal {
|
|
9
9
|
authorities: string[];
|
|
10
10
|
authenticated: boolean;
|
|
11
11
|
}
|
|
12
|
-
interface CsrfToken {
|
|
12
|
+
export interface CsrfToken {
|
|
13
13
|
token: string;
|
|
14
14
|
headerName: string;
|
|
15
15
|
parameterName: string;
|
|
16
16
|
}
|
|
17
|
-
declare const PROVIDERS: readonly ['APPLE', 'DISCORD', 'FACEBOOK', 'GITHUB', 'GOOGLE', 'LINKEDIN', 'MICROSOFT', 'SLACK', 'WECHAT', 'X', 'EMAIL', 'PHONE'];
|
|
18
|
-
type Provider = (typeof PROVIDERS)[number];
|
|
17
|
+
export declare const PROVIDERS: readonly ['APPLE', 'DISCORD', 'FACEBOOK', 'GITHUB', 'GOOGLE', 'LINKEDIN', 'MICROSOFT', 'SLACK', 'WECHAT', 'X', 'EMAIL', 'PHONE'];
|
|
18
|
+
export type Provider = (typeof PROVIDERS)[number];
|
|
19
19
|
//#endregion
|
|
20
|
-
export { Authentication, CsrfToken, JSONValue, PROVIDERS, Principal, Provider };
|
|
21
20
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/core/index.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/core/index.ts"],"mappings":";YAAY;GAKL,gBAAgB;IACnB,MAAM;iBAEO;EACf;;iBAGe,uBAAuB;EACtC;EACA;;iBAGe;EACf;EACA;EACA;;qBAGW;YAiBD,mBAAmB"}
|
package/dist/core/index.d.mts
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
//#region src/core/index.d.ts
|
|
2
|
-
type JSONValue = null | string | number | boolean | {
|
|
2
|
+
export type JSONValue = null | string | number | boolean | {
|
|
3
3
|
[value: string]: JSONValue;
|
|
4
4
|
} | Array<JSONValue>;
|
|
5
|
-
interface Principal {
|
|
5
|
+
export interface Principal {
|
|
6
6
|
name: string;
|
|
7
7
|
}
|
|
8
|
-
interface Authentication extends Principal {
|
|
8
|
+
export interface Authentication extends Principal {
|
|
9
9
|
authorities: string[];
|
|
10
10
|
authenticated: boolean;
|
|
11
11
|
}
|
|
12
|
-
interface CsrfToken {
|
|
12
|
+
export interface CsrfToken {
|
|
13
13
|
token: string;
|
|
14
14
|
headerName: string;
|
|
15
15
|
parameterName: string;
|
|
16
16
|
}
|
|
17
|
-
declare const PROVIDERS: readonly ['APPLE', 'DISCORD', 'FACEBOOK', 'GITHUB', 'GOOGLE', 'LINKEDIN', 'MICROSOFT', 'SLACK', 'WECHAT', 'X', 'EMAIL', 'PHONE'];
|
|
18
|
-
type Provider = (typeof PROVIDERS)[number];
|
|
17
|
+
export declare const PROVIDERS: readonly ['APPLE', 'DISCORD', 'FACEBOOK', 'GITHUB', 'GOOGLE', 'LINKEDIN', 'MICROSOFT', 'SLACK', 'WECHAT', 'X', 'EMAIL', 'PHONE'];
|
|
18
|
+
export type Provider = (typeof PROVIDERS)[number];
|
|
19
19
|
//#endregion
|
|
20
|
-
export { Authentication, CsrfToken, JSONValue, PROVIDERS, Principal, Provider };
|
|
21
20
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/core/index.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/core/index.ts"],"mappings":";YAAY;GAKL,gBAAgB;IACnB,MAAM;iBAEO;EACf;;iBAGe,uBAAuB;EACtC;EACA;;iBAGe;EACf;EACA;EACA;;qBAGW;YAiBD,mBAAmB"}
|
package/dist/email/schema.d.cts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
//#region src/email/schema.d.ts
|
|
2
|
-
declare const sendEmailVerificationCodeSchema: import("zod/mini").ZodMiniObject<{
|
|
2
|
+
export declare const sendEmailVerificationCodeSchema: import("zod/mini").ZodMiniObject<{
|
|
3
3
|
email: import("zod/mini").ZodMiniEmail;
|
|
4
4
|
turnstileToken: import("zod/mini").ZodMiniString<string>;
|
|
5
5
|
}, import("zod/v4/core").$strip>;
|
|
6
|
-
declare const loginEmailSchema: import("zod/mini").ZodMiniObject<{
|
|
6
|
+
export declare const loginEmailSchema: import("zod/mini").ZodMiniObject<{
|
|
7
7
|
email: import("zod/mini").ZodMiniEmail;
|
|
8
8
|
verificationCode: import("zod/mini").ZodMiniString<string>;
|
|
9
9
|
}, import("zod/v4/core").$strip>;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { loginEmailSchema, sendEmailVerificationCodeSchema };
|
|
12
11
|
//# sourceMappingURL=schema.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.cts","names":[],"sources":["../../src/email/schema.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"schema.d.cts","names":[],"sources":["../../src/email/schema.ts"],"mappings":";qBAEa,oDAA+B;;;yBAG1C;qBAEW,qCAAgB;;;yBAG3B"}
|
package/dist/email/schema.d.mts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
//#region src/email/schema.d.ts
|
|
2
|
-
declare const sendEmailVerificationCodeSchema: import("zod/mini").ZodMiniObject<{
|
|
2
|
+
export declare const sendEmailVerificationCodeSchema: import("zod/mini").ZodMiniObject<{
|
|
3
3
|
email: import("zod/mini").ZodMiniEmail;
|
|
4
4
|
turnstileToken: import("zod/mini").ZodMiniString<string>;
|
|
5
5
|
}, import("zod/v4/core").$strip>;
|
|
6
|
-
declare const loginEmailSchema: import("zod/mini").ZodMiniObject<{
|
|
6
|
+
export declare const loginEmailSchema: import("zod/mini").ZodMiniObject<{
|
|
7
7
|
email: import("zod/mini").ZodMiniEmail;
|
|
8
8
|
verificationCode: import("zod/mini").ZodMiniString<string>;
|
|
9
9
|
}, import("zod/v4/core").$strip>;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { loginEmailSchema, sendEmailVerificationCodeSchema };
|
|
12
11
|
//# sourceMappingURL=schema.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.mts","names":[],"sources":["../../src/email/schema.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"schema.d.mts","names":[],"sources":["../../src/email/schema.ts"],"mappings":";qBAEa,oDAA+B;;;yBAG1C;qBAEW,qCAAgB;;;yBAG3B"}
|
package/dist/oauth2/client.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { NativeCredential, OAuth2ClientConfig, OAuth2Token, OidcToken, PkceParameters, UserInfo } from "./types.cjs";
|
|
2
2
|
//#region src/oauth2/client.d.ts
|
|
3
|
-
declare const oauth2RedirectQuerySchema: import("zod/mini").ZodMiniObject<{
|
|
3
|
+
export declare const oauth2RedirectQuerySchema: import("zod/mini").ZodMiniObject<{
|
|
4
4
|
code: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
5
5
|
state: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
6
6
|
error: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
7
7
|
error_description: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
8
8
|
error_uri: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
9
9
|
}, import("zod/v4/core").$strip>;
|
|
10
|
-
declare const googleOneTapSchema: import("zod/mini").ZodMiniObject<{
|
|
10
|
+
export declare const googleOneTapSchema: import("zod/mini").ZodMiniObject<{
|
|
11
11
|
code: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
12
12
|
state: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
13
13
|
error: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
@@ -18,7 +18,7 @@ declare const googleOneTapSchema: import("zod/mini").ZodMiniObject<{
|
|
|
18
18
|
hd: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
19
19
|
credential: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
20
20
|
}, import("zod/v4/core").$strip>;
|
|
21
|
-
declare class OAuth2Client {
|
|
21
|
+
export declare class OAuth2Client {
|
|
22
22
|
private readonly config;
|
|
23
23
|
constructor(config: OAuth2ClientConfig);
|
|
24
24
|
get baseUri(): string;
|
|
@@ -54,5 +54,4 @@ declare class OAuth2Client {
|
|
|
54
54
|
}>;
|
|
55
55
|
}
|
|
56
56
|
//#endregion
|
|
57
|
-
export { OAuth2Client, googleOneTapSchema, oauth2RedirectQuerySchema };
|
|
58
57
|
//# sourceMappingURL=client.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.cts","names":[],"sources":["../../src/oauth2/client.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"client.d.cts","names":["_$__types0.UserInfo"],"sources":["../../src/oauth2/client.ts"],"mappings":";;qBAUa,8CAAyB;;;;;;yBAMpC;qBAEW,uCAAkB;;;;;;;;;;yBAY7B;qBAEW;mBACM;EACjB,YAAY,QAAQ;MAIhB;MAIA;MAIA;UAIU;EAcR,yBACJ,gBACA,OACA;IAEA;IACA;IACA,OAAO;MACL,QAAQ;EAcN,4BACJ,gBACA,MACA;IAEA;IACA;IACA,OAAO;MACL,QAAQ;EAcN,cACJ,gBACA;IAEA;IACA,OAAO,cAAc;MACtB,QADsBA;EAMjB,qBACJ,gBACA;IAEA;IACA;MACE,QAAQ;EAQN,YAAY,wBAAwB,gBAAa;EAQjD,oBACJ,gBACA,aACA;IAEA;IACA,aAAa;IACb,OAAO;MACR"}
|
package/dist/oauth2/client.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { NativeCredential, OAuth2ClientConfig, OAuth2Token, OidcToken, PkceParameters, UserInfo } from "./types.mjs";
|
|
2
2
|
//#region src/oauth2/client.d.ts
|
|
3
|
-
declare const oauth2RedirectQuerySchema: import("zod/mini").ZodMiniObject<{
|
|
3
|
+
export declare const oauth2RedirectQuerySchema: import("zod/mini").ZodMiniObject<{
|
|
4
4
|
code: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
5
5
|
state: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
6
6
|
error: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
7
7
|
error_description: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
8
8
|
error_uri: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
9
9
|
}, import("zod/v4/core").$strip>;
|
|
10
|
-
declare const googleOneTapSchema: import("zod/mini").ZodMiniObject<{
|
|
10
|
+
export declare const googleOneTapSchema: import("zod/mini").ZodMiniObject<{
|
|
11
11
|
code: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
12
12
|
state: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
13
13
|
error: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
@@ -18,7 +18,7 @@ declare const googleOneTapSchema: import("zod/mini").ZodMiniObject<{
|
|
|
18
18
|
hd: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
19
19
|
credential: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
20
20
|
}, import("zod/v4/core").$strip>;
|
|
21
|
-
declare class OAuth2Client {
|
|
21
|
+
export declare class OAuth2Client {
|
|
22
22
|
private readonly config;
|
|
23
23
|
constructor(config: OAuth2ClientConfig);
|
|
24
24
|
get baseUri(): string;
|
|
@@ -54,5 +54,4 @@ declare class OAuth2Client {
|
|
|
54
54
|
}>;
|
|
55
55
|
}
|
|
56
56
|
//#endregion
|
|
57
|
-
export { OAuth2Client, googleOneTapSchema, oauth2RedirectQuerySchema };
|
|
58
57
|
//# sourceMappingURL=client.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.mts","names":[],"sources":["../../src/oauth2/client.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"client.d.mts","names":["_$__types0.UserInfo"],"sources":["../../src/oauth2/client.ts"],"mappings":";;qBAUa,8CAAyB;;;;;;yBAMpC;qBAEW,uCAAkB;;;;;;;;;;yBAY7B;qBAEW;mBACM;EACjB,YAAY,QAAQ;MAIhB;MAIA;MAIA;UAIU;EAcR,yBACJ,gBACA,OACA;IAEA;IACA;IACA,OAAO;MACL,QAAQ;EAcN,4BACJ,gBACA,MACA;IAEA;IACA;IACA,OAAO;MACL,QAAQ;EAcN,cACJ,gBACA;IAEA;IACA,OAAO,cAAc;MACtB,QADsBA;EAMjB,qBACJ,gBACA;IAEA;IACA;MACE,QAAQ;EAQN,YAAY,wBAAwB,gBAAa;EAQjD,oBACJ,gBACA,aACA;IAEA;IACA,aAAa;IACb,OAAO;MACR"}
|
package/dist/oauth2/error.d.cts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
//#region src/oauth2/error.d.ts
|
|
2
|
-
type OAuth2ErrorType = 'invalid_request' | 'invalid_client' | 'invalid_grant' | 'invalid_token' | 'invalid_scope' | 'unauthorized_client' | 'unsupported_grant_type' | 'unsupported_response_type' | 'insufficient_scope' | 'redirect_uri_mismatch' | 'access_denied' | 'server_error' | 'temporarily_unavailable' | (string & {});
|
|
3
|
-
declare class OAuth2Error extends Error {
|
|
2
|
+
export type OAuth2ErrorType = 'invalid_request' | 'invalid_client' | 'invalid_grant' | 'invalid_token' | 'invalid_scope' | 'unauthorized_client' | 'unsupported_grant_type' | 'unsupported_response_type' | 'insufficient_scope' | 'redirect_uri_mismatch' | 'access_denied' | 'server_error' | 'temporarily_unavailable' | (string & {});
|
|
3
|
+
export declare class OAuth2Error extends Error {
|
|
4
4
|
readonly status: number;
|
|
5
5
|
readonly error: OAuth2ErrorType;
|
|
6
6
|
constructor(status: number, error: OAuth2ErrorType, message?: string);
|
|
7
7
|
}
|
|
8
|
-
declare class AuthenticationError extends Error {
|
|
8
|
+
export declare class AuthenticationError extends Error {
|
|
9
9
|
constructor(message: string);
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
12
|
-
export { AuthenticationError, OAuth2Error, OAuth2ErrorType };
|
|
13
12
|
//# sourceMappingURL=error.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.cts","names":[],"sources":["../../src/oauth2/error.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"error.d.cts","names":[],"sources":["../../src/oauth2/error.ts"],"mappings":";YACY;qBAgBC,oBAAoB;WACtB;WACA,OAAO;EAEhB,YAAY,gBAAgB,OAAO,iBAAiB;;qBAQzC,4BAA4B;EACvC,YAAY"}
|
package/dist/oauth2/error.d.mts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
//#region src/oauth2/error.d.ts
|
|
2
|
-
type OAuth2ErrorType = 'invalid_request' | 'invalid_client' | 'invalid_grant' | 'invalid_token' | 'invalid_scope' | 'unauthorized_client' | 'unsupported_grant_type' | 'unsupported_response_type' | 'insufficient_scope' | 'redirect_uri_mismatch' | 'access_denied' | 'server_error' | 'temporarily_unavailable' | (string & {});
|
|
3
|
-
declare class OAuth2Error extends Error {
|
|
2
|
+
export type OAuth2ErrorType = 'invalid_request' | 'invalid_client' | 'invalid_grant' | 'invalid_token' | 'invalid_scope' | 'unauthorized_client' | 'unsupported_grant_type' | 'unsupported_response_type' | 'insufficient_scope' | 'redirect_uri_mismatch' | 'access_denied' | 'server_error' | 'temporarily_unavailable' | (string & {});
|
|
3
|
+
export declare class OAuth2Error extends Error {
|
|
4
4
|
readonly status: number;
|
|
5
5
|
readonly error: OAuth2ErrorType;
|
|
6
6
|
constructor(status: number, error: OAuth2ErrorType, message?: string);
|
|
7
7
|
}
|
|
8
|
-
declare class AuthenticationError extends Error {
|
|
8
|
+
export declare class AuthenticationError extends Error {
|
|
9
9
|
constructor(message: string);
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
12
|
-
export { AuthenticationError, OAuth2Error, OAuth2ErrorType };
|
|
13
12
|
//# sourceMappingURL=error.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.mts","names":[],"sources":["../../src/oauth2/error.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"error.d.mts","names":[],"sources":["../../src/oauth2/error.ts"],"mappings":";YACY;qBAgBC,oBAAoB;WACtB;WACA,OAAO;EAEhB,YAAY,gBAAgB,OAAO,iBAAiB;;qBAQzC,4BAA4B;EACvC,YAAY"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/oauth2/provider/apple-client-secret.d.ts
|
|
2
|
-
interface AppleClientSecretOptions {
|
|
2
|
+
export interface AppleClientSecretOptions {
|
|
3
3
|
/** Apple Developer Team ID (Membership details). */
|
|
4
4
|
teamId: string;
|
|
5
5
|
/** Key ID of a key with Sign in with Apple enabled (Certificates, Identifiers & Profiles → Keys). */
|
|
@@ -22,7 +22,6 @@ interface AppleClientSecretOptions {
|
|
|
22
22
|
* `OAuth2ClientConfig.registration` function) instead of being generated by hand and stored, and
|
|
23
23
|
* rotated, as a static secret.
|
|
24
24
|
*/
|
|
25
|
-
declare function createAppleClientSecret(options: AppleClientSecretOptions): (clientId: string) => Promise<string>;
|
|
25
|
+
export declare function createAppleClientSecret(options: AppleClientSecretOptions): (clientId: string) => Promise<string>;
|
|
26
26
|
//#endregion
|
|
27
|
-
export { AppleClientSecretOptions, createAppleClientSecret };
|
|
28
27
|
//# sourceMappingURL=apple-client-secret.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apple-client-secret.d.cts","names":[],"sources":["../../../src/oauth2/provider/apple-client-secret.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"apple-client-secret.d.cts","names":[],"sources":["../../../src/oauth2/provider/apple-client-secret.ts"],"mappings":";iBAEiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;wBAcc,wBAAwB,SAAS,4BAAwB,qBAmBZ"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/oauth2/provider/apple-client-secret.d.ts
|
|
2
|
-
interface AppleClientSecretOptions {
|
|
2
|
+
export interface AppleClientSecretOptions {
|
|
3
3
|
/** Apple Developer Team ID (Membership details). */
|
|
4
4
|
teamId: string;
|
|
5
5
|
/** Key ID of a key with Sign in with Apple enabled (Certificates, Identifiers & Profiles → Keys). */
|
|
@@ -22,7 +22,6 @@ interface AppleClientSecretOptions {
|
|
|
22
22
|
* `OAuth2ClientConfig.registration` function) instead of being generated by hand and stored, and
|
|
23
23
|
* rotated, as a static secret.
|
|
24
24
|
*/
|
|
25
|
-
declare function createAppleClientSecret(options: AppleClientSecretOptions): (clientId: string) => Promise<string>;
|
|
25
|
+
export declare function createAppleClientSecret(options: AppleClientSecretOptions): (clientId: string) => Promise<string>;
|
|
26
26
|
//#endregion
|
|
27
|
-
export { AppleClientSecretOptions, createAppleClientSecret };
|
|
28
27
|
//# sourceMappingURL=apple-client-secret.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apple-client-secret.d.mts","names":[],"sources":["../../../src/oauth2/provider/apple-client-secret.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"apple-client-secret.d.mts","names":[],"sources":["../../../src/oauth2/provider/apple-client-secret.ts"],"mappings":";iBAEiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;wBAcc,wBAAwB,SAAS,4BAAwB,qBAmBZ"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { NativeCredential, OAuth2Token, Provider } from "../types.cjs";
|
|
2
2
|
//#region src/oauth2/provider/apple.d.ts
|
|
3
|
-
declare function createAppleProvider(): Provider;
|
|
4
|
-
declare const apple: Provider;
|
|
5
|
-
interface AppleUserInfo {
|
|
3
|
+
export declare function createAppleProvider(): Provider;
|
|
4
|
+
export declare const apple: Provider;
|
|
5
|
+
export interface AppleUserInfo {
|
|
6
6
|
sub: string;
|
|
7
7
|
email: string;
|
|
8
8
|
email_verified: true | 'true';
|
|
@@ -20,23 +20,22 @@ interface AppleUserInfo {
|
|
|
20
20
|
nonce?: string;
|
|
21
21
|
nonce_supported?: boolean;
|
|
22
22
|
}
|
|
23
|
-
interface AppleToken extends OAuth2Token {
|
|
23
|
+
export interface AppleToken extends OAuth2Token {
|
|
24
24
|
access_token: string;
|
|
25
25
|
token_type: string;
|
|
26
26
|
expires_in: number;
|
|
27
27
|
refresh_token: string;
|
|
28
28
|
id_token: string;
|
|
29
29
|
}
|
|
30
|
-
interface AppleNativeCredential extends NativeCredential {
|
|
30
|
+
export interface AppleNativeCredential extends NativeCredential {
|
|
31
31
|
state: string;
|
|
32
32
|
code: string;
|
|
33
33
|
id_token: string;
|
|
34
34
|
user: string;
|
|
35
35
|
email?: string;
|
|
36
36
|
}
|
|
37
|
-
interface AppleErrorResponse {
|
|
37
|
+
export interface AppleErrorResponse {
|
|
38
38
|
error: 'invalid_request' | 'invalid_client' | 'invalid_grant' | 'unauthorized_client' | 'unsupported_grant_type' | 'invalid_scope';
|
|
39
39
|
}
|
|
40
40
|
//#endregion
|
|
41
|
-
export { AppleErrorResponse, AppleNativeCredential, AppleToken, AppleUserInfo, apple, createAppleProvider };
|
|
42
41
|
//# sourceMappingURL=apple.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apple.d.cts","names":[],"sources":["../../../src/oauth2/provider/apple.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"apple.d.cts","names":[],"sources":["../../../src/oauth2/provider/apple.ts"],"mappings":";;wBAMgB,uBAAuB;qBAwD1B,OAAK;iBAGD;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;IACE;MAAQ;MAAmB;;IAC3B;;EAEF;EACA;;iBAKe,mBAAmB;EAClC;EACA;EACA;EACA;EACA;;iBAGe,8BAA8B;EAC7C;EACA;EACA;EAEA;EACA;;iBAIe;EACf"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { NativeCredential, OAuth2Token, Provider } from "../types.mjs";
|
|
2
2
|
//#region src/oauth2/provider/apple.d.ts
|
|
3
|
-
declare function createAppleProvider(): Provider;
|
|
4
|
-
declare const apple: Provider;
|
|
5
|
-
interface AppleUserInfo {
|
|
3
|
+
export declare function createAppleProvider(): Provider;
|
|
4
|
+
export declare const apple: Provider;
|
|
5
|
+
export interface AppleUserInfo {
|
|
6
6
|
sub: string;
|
|
7
7
|
email: string;
|
|
8
8
|
email_verified: true | 'true';
|
|
@@ -20,23 +20,22 @@ interface AppleUserInfo {
|
|
|
20
20
|
nonce?: string;
|
|
21
21
|
nonce_supported?: boolean;
|
|
22
22
|
}
|
|
23
|
-
interface AppleToken extends OAuth2Token {
|
|
23
|
+
export interface AppleToken extends OAuth2Token {
|
|
24
24
|
access_token: string;
|
|
25
25
|
token_type: string;
|
|
26
26
|
expires_in: number;
|
|
27
27
|
refresh_token: string;
|
|
28
28
|
id_token: string;
|
|
29
29
|
}
|
|
30
|
-
interface AppleNativeCredential extends NativeCredential {
|
|
30
|
+
export interface AppleNativeCredential extends NativeCredential {
|
|
31
31
|
state: string;
|
|
32
32
|
code: string;
|
|
33
33
|
id_token: string;
|
|
34
34
|
user: string;
|
|
35
35
|
email?: string;
|
|
36
36
|
}
|
|
37
|
-
interface AppleErrorResponse {
|
|
37
|
+
export interface AppleErrorResponse {
|
|
38
38
|
error: 'invalid_request' | 'invalid_client' | 'invalid_grant' | 'unauthorized_client' | 'unsupported_grant_type' | 'invalid_scope';
|
|
39
39
|
}
|
|
40
40
|
//#endregion
|
|
41
|
-
export { AppleErrorResponse, AppleNativeCredential, AppleToken, AppleUserInfo, apple, createAppleProvider };
|
|
42
41
|
//# sourceMappingURL=apple.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apple.d.mts","names":[],"sources":["../../../src/oauth2/provider/apple.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"apple.d.mts","names":[],"sources":["../../../src/oauth2/provider/apple.ts"],"mappings":";;wBAMgB,uBAAuB;qBAwD1B,OAAK;iBAGD;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;IACE;MAAQ;MAAmB;;IAC3B;;EAEF;EACA;;iBAKe,mBAAmB;EAClC;EACA;EACA;EACA;EACA;;iBAGe,8BAA8B;EAC7C;EACA;EACA;EAEA;EACA;;iBAIe;EACf"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExchangeCodeParams, PkceParameters, RefreshTokenParams } from "../types.cjs";
|
|
2
2
|
//#region src/oauth2/provider/common.d.ts
|
|
3
|
-
declare function createAuthorizationUri(options: {
|
|
3
|
+
export declare function createAuthorizationUri(options: {
|
|
4
4
|
state: string;
|
|
5
5
|
scope: string[];
|
|
6
6
|
clientId: string;
|
|
@@ -8,11 +8,11 @@ declare function createAuthorizationUri(options: {
|
|
|
8
8
|
authorizationUri: string;
|
|
9
9
|
pkce?: Omit<PkceParameters, 'code_verifier'>;
|
|
10
10
|
}): URL;
|
|
11
|
-
declare function exchangeAuthorizationCode(params: ExchangeCodeParams & {
|
|
11
|
+
export declare function exchangeAuthorizationCode(params: ExchangeCodeParams & {
|
|
12
12
|
tokenUri: string;
|
|
13
13
|
authentication?: 'basic' | 'post';
|
|
14
14
|
}): Promise<Response>;
|
|
15
|
-
declare function refreshAccessToken(params: RefreshTokenParams & {
|
|
15
|
+
export declare function refreshAccessToken(params: RefreshTokenParams & {
|
|
16
16
|
tokenUri: string;
|
|
17
17
|
authentication?: 'basic' | 'post';
|
|
18
18
|
}): Promise<Response>;
|
|
@@ -23,8 +23,7 @@ interface RevokeTokenParams {
|
|
|
23
23
|
tokenRevokeUri: string;
|
|
24
24
|
authentication?: 'basic' | 'post';
|
|
25
25
|
}
|
|
26
|
-
declare function revokeToken(params: RevokeTokenParams): Promise<void>;
|
|
27
|
-
declare function verifyIdToken<T>(idToken: string, jwkSetUri: string): Promise<T>;
|
|
26
|
+
export declare function revokeToken(params: RevokeTokenParams): Promise<void>;
|
|
27
|
+
export declare function verifyIdToken<T>(idToken: string, jwkSetUri: string): Promise<T>;
|
|
28
28
|
//#endregion
|
|
29
|
-
export { createAuthorizationUri, exchangeAuthorizationCode, refreshAccessToken, revokeToken, verifyIdToken };
|
|
30
29
|
//# sourceMappingURL=common.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.cts","names":[],"sources":["../../../src/oauth2/provider/common.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"common.d.cts","names":[],"sources":["../../../src/oauth2/provider/common.ts"],"mappings":";;wBAIgB,uBAAuB;EACrC;EACA;EACA;EACA;EACA;EACA,OAAO,KAAK;IACb;wBAcqB,0BACpB,QAAQ;EACN;EACA;IACD,QAAA;wBAwBmB,mBACpB,QAAQ;EACN;EACA;IACD,QAAA;UAsBO;EACR;EACA;EACA;EACA;EACA;;wBAGoB,YAAY,QAAQ,oBAAiB;wBAwBrC,cAAc,GAAG,iBAAiB,oBAAiB,QAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExchangeCodeParams, PkceParameters, RefreshTokenParams } from "../types.mjs";
|
|
2
2
|
//#region src/oauth2/provider/common.d.ts
|
|
3
|
-
declare function createAuthorizationUri(options: {
|
|
3
|
+
export declare function createAuthorizationUri(options: {
|
|
4
4
|
state: string;
|
|
5
5
|
scope: string[];
|
|
6
6
|
clientId: string;
|
|
@@ -8,11 +8,11 @@ declare function createAuthorizationUri(options: {
|
|
|
8
8
|
authorizationUri: string;
|
|
9
9
|
pkce?: Omit<PkceParameters, 'code_verifier'>;
|
|
10
10
|
}): URL;
|
|
11
|
-
declare function exchangeAuthorizationCode(params: ExchangeCodeParams & {
|
|
11
|
+
export declare function exchangeAuthorizationCode(params: ExchangeCodeParams & {
|
|
12
12
|
tokenUri: string;
|
|
13
13
|
authentication?: 'basic' | 'post';
|
|
14
14
|
}): Promise<Response>;
|
|
15
|
-
declare function refreshAccessToken(params: RefreshTokenParams & {
|
|
15
|
+
export declare function refreshAccessToken(params: RefreshTokenParams & {
|
|
16
16
|
tokenUri: string;
|
|
17
17
|
authentication?: 'basic' | 'post';
|
|
18
18
|
}): Promise<Response>;
|
|
@@ -23,8 +23,7 @@ interface RevokeTokenParams {
|
|
|
23
23
|
tokenRevokeUri: string;
|
|
24
24
|
authentication?: 'basic' | 'post';
|
|
25
25
|
}
|
|
26
|
-
declare function revokeToken(params: RevokeTokenParams): Promise<void>;
|
|
27
|
-
declare function verifyIdToken<T>(idToken: string, jwkSetUri: string): Promise<T>;
|
|
26
|
+
export declare function revokeToken(params: RevokeTokenParams): Promise<void>;
|
|
27
|
+
export declare function verifyIdToken<T>(idToken: string, jwkSetUri: string): Promise<T>;
|
|
28
28
|
//#endregion
|
|
29
|
-
export { createAuthorizationUri, exchangeAuthorizationCode, refreshAccessToken, revokeToken, verifyIdToken };
|
|
30
29
|
//# sourceMappingURL=common.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.mts","names":[],"sources":["../../../src/oauth2/provider/common.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"common.d.mts","names":[],"sources":["../../../src/oauth2/provider/common.ts"],"mappings":";;wBAIgB,uBAAuB;EACrC;EACA;EACA;EACA;EACA;EACA,OAAO,KAAK;IACb;wBAcqB,0BACpB,QAAQ;EACN;EACA;IACD,QAAA;wBAwBmB,mBACpB,QAAQ;EACN;EACA;IACD,QAAA;UAsBO;EACR;EACA;EACA;EACA;EACA;;wBAGoB,YAAY,QAAQ,oBAAiB;wBAwBrC,cAAc,GAAG,iBAAiB,oBAAiB,QAAA"}
|