@crvouga/mockingbird-service-oauth 1.2.1 → 1.3.0
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/CHANGELOG.md +6 -0
- package/README.md +6 -2
- package/dist/{chunk-2JIADQOV.js → chunk-MKBPAVYU.js} +2 -2
- package/dist/{chunk-XP2AEPEJ.js → chunk-WHI7Y2UA.js} +53 -2
- package/dist/{chunk-XP2AEPEJ.js.map → chunk-WHI7Y2UA.js.map} +2 -2
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +21 -1
- package/dist/index.js +1 -1
- package/dist/server.d.ts +20 -0
- package/dist/server.js +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-2JIADQOV.js.map → chunk-MKBPAVYU.js.map} +0 -0
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -839,6 +839,16 @@ type NotificationDelivery = {
|
|
|
839
839
|
status?: number;
|
|
840
840
|
error?: string;
|
|
841
841
|
};
|
|
842
|
+
/** What one client sees for one account: see `OAuthAPI.grant`. */
|
|
843
|
+
type GrantView = {
|
|
844
|
+
subject: string;
|
|
845
|
+
granted: boolean;
|
|
846
|
+
scopes: string[];
|
|
847
|
+
emailChoice: "share" | "hide" | null;
|
|
848
|
+
email: string;
|
|
849
|
+
isPrivateEmail: boolean;
|
|
850
|
+
userDisclosed: boolean;
|
|
851
|
+
};
|
|
842
852
|
|
|
843
853
|
/**
|
|
844
854
|
* The slice of OpenAPI 3.1 (and JSON Schema 2020-12) Mockingbird understands.
|
|
@@ -1119,6 +1129,16 @@ declare class OAuthAPI {
|
|
|
1119
1129
|
private notify;
|
|
1120
1130
|
/** Drops one client's grant for an account: consent, identity, first-use disclosure, codes, tokens. */
|
|
1121
1131
|
private forget;
|
|
1132
|
+
/**
|
|
1133
|
+
* What `clientId` sees for `accountId` (a test control mirroring private provider state), or
|
|
1134
|
+
* `null` for an unknown client or account. For a client that never authorized the account,
|
|
1135
|
+
* `subject` is the id token `sub` it would receive and `email` the real address.
|
|
1136
|
+
*/
|
|
1137
|
+
grant(clientId: string, accountId: string): Promise<GrantView | null>;
|
|
1138
|
+
/** The grant view of every account that has authorized `clientId`, oldest account first. */
|
|
1139
|
+
grants(clientId: string): Promise<(GrantView & {
|
|
1140
|
+
accountId: string;
|
|
1141
|
+
})[] | null>;
|
|
1122
1142
|
private paths;
|
|
1123
1143
|
private supportedScopes;
|
|
1124
1144
|
private identityKey;
|
|
@@ -1140,4 +1160,4 @@ declare class OAuthAPI {
|
|
|
1140
1160
|
}
|
|
1141
1161
|
|
|
1142
1162
|
export { OAUTH_PRESETS, OAUTH_SCENARIOS, OAuthAPI, createMultiRuntime, createRuntime, document, operationIds, supportedOperationIds };
|
|
1143
|
-
export type { Account, AppleNotificationType, BehaviorEvent, BehaviorInput, Client, EdgeCase, NotificationDelivery, OAuthAPIOptions, OAuthBehavior, OAuthMount, OAuthMultiRuntime, OAuthMultiRuntimeOptions, OAuthRuntime, OAuthRuntimeOptions, OAuthScenario, Provider };
|
|
1163
|
+
export type { Account, AppleNotificationType, BehaviorEvent, BehaviorInput, Client, EdgeCase, GrantView, NotificationDelivery, OAuthAPIOptions, OAuthBehavior, OAuthMount, OAuthMultiRuntime, OAuthMultiRuntimeOptions, OAuthRuntime, OAuthRuntimeOptions, OAuthScenario, Provider };
|
package/dist/index.js
CHANGED
package/dist/server.d.ts
CHANGED
|
@@ -1378,6 +1378,16 @@ type NotificationDelivery = {
|
|
|
1378
1378
|
status?: number;
|
|
1379
1379
|
error?: string;
|
|
1380
1380
|
};
|
|
1381
|
+
/** What one client sees for one account: see `OAuthAPI.grant`. */
|
|
1382
|
+
type GrantView = {
|
|
1383
|
+
subject: string;
|
|
1384
|
+
granted: boolean;
|
|
1385
|
+
scopes: string[];
|
|
1386
|
+
emailChoice: "share" | "hide" | null;
|
|
1387
|
+
email: string;
|
|
1388
|
+
isPrivateEmail: boolean;
|
|
1389
|
+
userDisclosed: boolean;
|
|
1390
|
+
};
|
|
1381
1391
|
|
|
1382
1392
|
type OAuthAPIOptions = APIOptions & {
|
|
1383
1393
|
/** Browser Fetch forbids Cookie/Set-Cookie; local transports may explicitly remap them. */
|
|
@@ -1455,6 +1465,16 @@ declare class OAuthAPI {
|
|
|
1455
1465
|
private notify;
|
|
1456
1466
|
/** Drops one client's grant for an account: consent, identity, first-use disclosure, codes, tokens. */
|
|
1457
1467
|
private forget;
|
|
1468
|
+
/**
|
|
1469
|
+
* What `clientId` sees for `accountId` (a test control mirroring private provider state), or
|
|
1470
|
+
* `null` for an unknown client or account. For a client that never authorized the account,
|
|
1471
|
+
* `subject` is the id token `sub` it would receive and `email` the real address.
|
|
1472
|
+
*/
|
|
1473
|
+
grant(clientId: string, accountId: string): Promise<GrantView | null>;
|
|
1474
|
+
/** The grant view of every account that has authorized `clientId`, oldest account first. */
|
|
1475
|
+
grants(clientId: string): Promise<(GrantView & {
|
|
1476
|
+
accountId: string;
|
|
1477
|
+
})[] | null>;
|
|
1458
1478
|
private paths;
|
|
1459
1479
|
private supportedScopes;
|
|
1460
1480
|
private identityKey;
|
package/dist/server.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crvouga/mockingbird-service-oauth",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Portable social-login mock with Google, Apple, Microsoft, GitHub and generic OIDC profiles, private relay identities, reproducible edge cases, signed tokens and an accessible UI.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
File without changes
|