@softistx/janus-social 0.0.0-stage → 0.8.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.
Files changed (105) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +356 -2
  3. package/dist/authorization-url.d.ts +21 -0
  4. package/dist/authorization-url.d.ts.map +1 -0
  5. package/dist/check-options.d.ts +22 -0
  6. package/dist/check-options.d.ts.map +1 -0
  7. package/dist/claims.d.ts +15 -0
  8. package/dist/claims.d.ts.map +1 -0
  9. package/dist/code-exchange.d.ts +79 -0
  10. package/dist/code-exchange.d.ts.map +1 -0
  11. package/dist/connections/abort.d.ts +8 -0
  12. package/dist/connections/abort.d.ts.map +1 -0
  13. package/dist/connections/at-hash.d.ts +24 -0
  14. package/dist/connections/at-hash.d.ts.map +1 -0
  15. package/dist/connections/body-limit.d.ts +15 -0
  16. package/dist/connections/body-limit.d.ts.map +1 -0
  17. package/dist/connections/build.d.ts +7 -0
  18. package/dist/connections/build.d.ts.map +1 -0
  19. package/dist/connections/check.d.ts +25 -0
  20. package/dist/connections/check.d.ts.map +1 -0
  21. package/dist/connections/claims.d.ts +16 -0
  22. package/dist/connections/claims.d.ts.map +1 -0
  23. package/dist/connections/discovery.d.ts +20 -0
  24. package/dist/connections/discovery.d.ts.map +1 -0
  25. package/dist/connections/domain.d.ts +15 -0
  26. package/dist/connections/domain.d.ts.map +1 -0
  27. package/dist/connections/guarded-fetch.d.ts +49 -0
  28. package/dist/connections/guarded-fetch.d.ts.map +1 -0
  29. package/dist/connections/id-token-steps.d.ts +15 -0
  30. package/dist/connections/id-token-steps.d.ts.map +1 -0
  31. package/dist/connections/id-token.d.ts +63 -0
  32. package/dist/connections/id-token.d.ts.map +1 -0
  33. package/dist/connections/index.d.ts +11 -0
  34. package/dist/connections/index.d.ts.map +1 -0
  35. package/dist/connections/ip.d.ts +14 -0
  36. package/dist/connections/ip.d.ts.map +1 -0
  37. package/dist/connections/issuer-cache.d.ts +40 -0
  38. package/dist/connections/issuer-cache.d.ts.map +1 -0
  39. package/dist/connections/issuer.d.ts +4 -0
  40. package/dist/connections/issuer.d.ts.map +1 -0
  41. package/dist/connections/key-flights.d.ts +16 -0
  42. package/dist/connections/key-flights.d.ts.map +1 -0
  43. package/dist/connections/memory.d.ts +10 -0
  44. package/dist/connections/memory.d.ts.map +1 -0
  45. package/dist/connections/oidc-connections.d.ts +71 -0
  46. package/dist/connections/oidc-connections.d.ts.map +1 -0
  47. package/dist/connections/provider.d.ts +25 -0
  48. package/dist/connections/provider.d.ts.map +1 -0
  49. package/dist/connections/server.d.ts +55 -0
  50. package/dist/connections/server.d.ts.map +1 -0
  51. package/dist/connections/types.d.ts +87 -0
  52. package/dist/connections/types.d.ts.map +1 -0
  53. package/dist/connections/url-policy.d.ts +30 -0
  54. package/dist/connections/url-policy.d.ts.map +1 -0
  55. package/dist/connections/wiring.d.ts +5 -0
  56. package/dist/connections/wiring.d.ts.map +1 -0
  57. package/dist/discovery.d.ts +11 -0
  58. package/dist/discovery.d.ts.map +1 -0
  59. package/dist/dpop.d.ts +18 -0
  60. package/dist/dpop.d.ts.map +1 -0
  61. package/dist/failure.d.ts +14 -0
  62. package/dist/failure.d.ts.map +1 -0
  63. package/dist/github-identity.d.ts +11 -0
  64. package/dist/github-identity.d.ts.map +1 -0
  65. package/dist/github.d.ts +11 -0
  66. package/dist/github.d.ts.map +1 -0
  67. package/dist/google.d.ts +11 -0
  68. package/dist/google.d.ts.map +1 -0
  69. package/dist/guard-error.d.ts +14 -0
  70. package/dist/guard-error.d.ts.map +1 -0
  71. package/dist/index.d.ts +23 -0
  72. package/dist/index.d.ts.map +1 -0
  73. package/dist/index.js +1825 -0
  74. package/dist/index.js.map +51 -0
  75. package/dist/microsoft-tenant.d.ts +32 -0
  76. package/dist/microsoft-tenant.d.ts.map +1 -0
  77. package/dist/microsoft.d.ts +16 -0
  78. package/dist/microsoft.d.ts.map +1 -0
  79. package/dist/oauth2.d.ts +13 -0
  80. package/dist/oauth2.d.ts.map +1 -0
  81. package/dist/oidc-engine.d.ts +62 -0
  82. package/dist/oidc-engine.d.ts.map +1 -0
  83. package/dist/oidc-step-up.d.ts +15 -0
  84. package/dist/oidc-step-up.d.ts.map +1 -0
  85. package/dist/oidc.d.ts +11 -0
  86. package/dist/oidc.d.ts.map +1 -0
  87. package/dist/options.d.ts +108 -0
  88. package/dist/options.d.ts.map +1 -0
  89. package/dist/pushed-authorization.d.ts +23 -0
  90. package/dist/pushed-authorization.d.ts.map +1 -0
  91. package/dist/step-up.d.ts +50 -0
  92. package/dist/step-up.d.ts.map +1 -0
  93. package/dist/transport.d.ts +18 -0
  94. package/dist/transport.d.ts.map +1 -0
  95. package/docs/README.md +35 -0
  96. package/docs/guide/custom-providers.md +182 -0
  97. package/docs/guide/github.md +109 -0
  98. package/docs/guide/google.md +103 -0
  99. package/docs/guide/microsoft.md +158 -0
  100. package/docs/guide/oidc-connections.md +265 -0
  101. package/docs/guide/oidc-step-up.md +122 -0
  102. package/docs/guide/par-dpop.md +63 -0
  103. package/docs/roadmap.md +33 -0
  104. package/docs/troubleshooting.md +632 -0
  105. package/package.json +67 -5
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/connections/types.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,YACjC,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,CACE,CAAC;AAEX,4CAA4C;AAC5C,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,GAAG,gBAAgB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE/D,oGAAoG;AACpG,MAAM,WAAW,UAAU;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,6EAA6E;AAC7E,MAAM,WAAW,gBAAgB;IAChC,qBAAqB;IACrB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,kJAAkJ;IAClJ,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3C;;;;OAIG;IACH,QAAQ,CAAC,wBAAwB,CAAC,EAAE,mBAAmB,CAAC;CACxD;AAED;;;GAGG;AACH,MAAM,WAAW,cAAe,SAAQ,mBAAmB;IAC1D;;;;OAIG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,+GAA+G;IAC/G,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC,iGAAiG;IACjG,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,sCAAsC;IACtC,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;IAC7B,qDAAqD;IACrD,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACpC;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAChC,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC3D,kEAAkE;IAClE,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CACvE"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * What a URL the server calls on behalf of a tenant may be. Pure checks, no
3
+ * I/O; the transport (`guarded-fetch.ts`) applies them before every request.
4
+ *
5
+ * The policy is the built-in one (https only, no credentials, no IP literal
6
+ * of a loopback, private, link-local, metadata, CGNAT, ULA, unspecified,
7
+ * multicast or reserved range, including those wrapped in IPv4-mapped,
8
+ * NAT64 or 6to4 IPv6, no `localhost`, `*.localhost` or single-label host).
9
+ * An application's `allowUrl` hook can only **narrow** it: it runs after the
10
+ * built-in checks pass, and `true` never lifts a refusal.
11
+ */
12
+ /** The application's extra check; `false` refuses. It cannot allow what the policy refused. */
13
+ export type AllowUrl = (url: URL) => boolean;
14
+ /**
15
+ * Why a URL is refused, or `undefined` when it passes. The reason is a fixed
16
+ * word, never a part of the URL. The check reads `url.hostname`, which the
17
+ * WHATWG parser has already canonicalised (`http://2130706433` is
18
+ * `127.0.0.1`, `0x7f.1` too), so decimal, octal and hex forms are seen as
19
+ * the dotted address they mean.
20
+ */
21
+ export declare function urlRefusal(url: URL, allowUrl?: AllowUrl): string | undefined;
22
+ /** The IP literal a hostname spells, as text, or `undefined` for a name. */
23
+ export declare function literalOf(hostname: string): string | undefined;
24
+ /**
25
+ * Why a DNS answer is refused, or `undefined`. **Every** address must be
26
+ * public: one private address among public ones refuses the answer, since
27
+ * the connection may land on any of them. An empty answer is refused.
28
+ */
29
+ export declare function addressesRefusal(addresses: readonly string[]): string | undefined;
30
+ //# sourceMappingURL=url-policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"url-policy.d.ts","sourceRoot":"","sources":["../../src/connections/url-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,+FAA+F;AAC/F,MAAM,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;AAE7C;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,CAQ5E;AAED,4EAA4E;AAC5E,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAI9D;AAkBD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC/B,SAAS,EAAE,SAAS,MAAM,EAAE,GAC1B,MAAM,GAAG,SAAS,CAGpB"}
@@ -0,0 +1,5 @@
1
+ /** Wiring-time checks of the `oidcConnections` options: a bad one is a `TypeError` naming it, never its value. */
2
+ import type { OidcConnectionsOptions } from './oidc-connections';
3
+ /** Throws a `TypeError` unless the options can wire a facade. */
4
+ export declare function checkOptions(options: unknown): asserts options is OidcConnectionsOptions;
5
+ //# sourceMappingURL=wiring.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wiring.d.ts","sourceRoot":"","sources":["../../src/connections/wiring.ts"],"names":[],"mappings":"AAAA,kHAAkH;AAIlH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAUjE,iEAAiE;AACjE,wBAAgB,YAAY,CAC3B,OAAO,EAAE,OAAO,GACd,OAAO,CAAC,OAAO,IAAI,sBAAsB,CA6C3C"}
@@ -0,0 +1,11 @@
1
+ /** Lazy, cached OpenID Connect discovery. */
2
+ import * as oauth from 'oauth4webapi';
3
+ import type { transport } from './transport';
4
+ /**
5
+ * Reads the provider's discovery document on first use and keeps it. **A
6
+ * failure is not kept**: the next call asks again, so a provider that was
7
+ * down at the first sign-in does not take the application down with it.
8
+ * Concurrent first calls share one request.
9
+ */
10
+ export declare function discover(issuer: string, http: ReturnType<typeof transport>): () => Promise<oauth.AuthorizationServer>;
11
+ //# sourceMappingURL=discovery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../src/discovery.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAE7C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;GAKG;AACH,wBAAgB,QAAQ,CACvB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,UAAU,CAAC,OAAO,SAAS,CAAC,GAChC,MAAM,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAkB1C"}
package/dist/dpop.d.ts ADDED
@@ -0,0 +1,18 @@
1
+ /**
2
+ * DPoP (RFC 9449) for the code exchange: a fresh, non-extractable key pair per
3
+ * exchange (the tokens are read once, for the ID token, so nothing persists),
4
+ * and one retry when the server asks for its nonce.
5
+ */
6
+ import * as oauth from 'oauth4webapi';
7
+ import type { DpopAlgorithm, OidcSecurityOptions } from './options';
8
+ /** The algorithm `dpop` asks for, or `undefined` when DPoP is off. */
9
+ export declare function dpopAlgorithm(dpop: OidcSecurityOptions['dpop']): DpopAlgorithm | undefined;
10
+ /** A DPoP handle on a key pair made now. */
11
+ export declare function newHandle(algorithm: DpopAlgorithm): Promise<oauth.DPoPHandle>;
12
+ /**
13
+ * Runs `attempt`, and once more when it fails with `use_dpop_nonce`: the
14
+ * handle has kept the server's nonce from that answer, so the second proof
15
+ * carries it. A second refusal propagates.
16
+ */
17
+ export declare function withNonceRetry<T>(attempt: () => Promise<T>): Promise<T>;
18
+ //# sourceMappingURL=dpop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dpop.d.ts","sourceRoot":"","sources":["../src/dpop.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEpE,sEAAsE;AACtE,wBAAgB,aAAa,CAC5B,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,GAC/B,aAAa,GAAG,SAAS,CAG3B;AAED,4CAA4C;AAC5C,wBAAsB,SAAS,CAC9B,SAAS,EAAE,aAAa,GACtB,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAG3B;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAO7E"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Turns what oauth4webapi and `fetch` throw into the one error this package
3
+ * throws: `SocialError('PROVIDER_ERROR')`, with a `reason` for the logs. The
4
+ * original stays as `cause`; **a message never carries a URL, a token or what
5
+ * the provider wrote**, since the core's callers may log it.
6
+ */
7
+ import { SocialError } from '@softistx/janus';
8
+ type Reason = 'denied' | 'refused' | 'unreachable';
9
+ /** A `PROVIDER_ERROR` that says only the step and the reason. */
10
+ export declare function providerError(step: string, reason: Reason, cause?: unknown): SocialError;
11
+ /** Runs one step of the exchange; whatever it throws leaves as `PROVIDER_ERROR`. */
12
+ export declare function inStep<T>(step: string, run: () => Promise<T> | T): Promise<T>;
13
+ export {};
14
+ //# sourceMappingURL=failure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"failure.d.ts","sourceRoot":"","sources":["../src/failure.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAU9C,KAAK,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,aAAa,CAAC;AAEnD,iEAAiE;AACjE,wBAAgB,aAAa,CAC5B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,OAAO,GACb,WAAW,CAWb;AAED,oFAAoF;AACpF,wBAAsB,MAAM,CAAC,CAAC,EAC7B,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GACvB,OAAO,CAAC,CAAC,CAAC,CAMZ"}
@@ -0,0 +1,11 @@
1
+ /** Reading a GitHub account: `GET /user` and `GET /user/emails`. */
2
+ import type { SocialIdentity } from '@softistx/janus';
3
+ import type { SocialFetch } from './options';
4
+ /**
5
+ * The account behind the access token. **The e-mail is the primary address,
6
+ * and only when it is verified**: a verified secondary address is not the one
7
+ * the account answers to, and an unverified one is anybody's claim. Without
8
+ * such an address the identity has `email: null`.
9
+ */
10
+ export declare function githubIdentity(accessToken: string, fetch: SocialFetch): Promise<SocialIdentity>;
11
+ //# sourceMappingURL=github-identity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github-identity.d.ts","sourceRoot":"","sources":["../src/github-identity.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAEpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAkC7C;;;;;GAKG;AACH,wBAAsB,cAAc,CACnC,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,WAAW,GAChB,OAAO,CAAC,cAAc,CAAC,CA2BzB"}
@@ -0,0 +1,11 @@
1
+ /** `github`: GitHub through OAuth 2.0. */
2
+ import type { SocialProvider } from '@softistx/janus';
3
+ import type { GithubOptions } from './options';
4
+ /**
5
+ * GitHub sign-in (an OAuth app or a GitHub App's user authorization). Asks for
6
+ * `read:user` and `user:email`, with PKCE. The account is the numeric user id;
7
+ * the e-mail is the **primary** address and only when GitHub marks it
8
+ * **verified**, else `null`.
9
+ */
10
+ export declare function github(options: GithubOptions): SocialProvider;
11
+ //# sourceMappingURL=github.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../src/github.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAE1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,cAAc,CAQ7D"}
@@ -0,0 +1,11 @@
1
+ /** `google`: Google through OpenID Connect. */
2
+ import type { SocialProvider } from '@softistx/janus';
3
+ import type { GoogleOptions } from './options';
4
+ /**
5
+ * Google sign-in. The e-mail counts when the ID token's `email_verified` is
6
+ * true. With `hostedDomain`, the sign-in is also refused unless the ID
7
+ * token's `hd` claim is that domain — Google's `hd` request parameter is a
8
+ * hint the visitor can edit, so the claim is what is trusted.
9
+ */
10
+ export declare function google(options: GoogleOptions): SocialProvider;
11
+ //# sourceMappingURL=google.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"google.d.ts","sourceRoot":"","sources":["../src/google.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAE/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAMtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAK/C;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,cAAc,CAuB7D"}
@@ -0,0 +1,14 @@
1
+ /** The one error the guarded transport throws. */
2
+ /** Why the guard refused; also the `code` the failure mapping keeps. */
3
+ export type GuardCode = 'url' | 'address' | 'dns' | 'redirect' | 'content-type' | 'server-error' | 'oversize';
4
+ /**
5
+ * A request or an answer the guard refused. The failure mapping reports it
6
+ * as `PROVIDER_ERROR`: reason `unreachable` for `dns` and `server-error`, `refused` for the rest.
7
+ * `code` is the only detail kept; the message is fixed text, never a URL, a
8
+ * query string, an address, a header or a body.
9
+ */
10
+ export declare class GuardError extends Error {
11
+ readonly code: GuardCode;
12
+ constructor(code: GuardCode);
13
+ }
14
+ //# sourceMappingURL=guard-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guard-error.d.ts","sourceRoot":"","sources":["../src/guard-error.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAElD,wEAAwE;AACxE,MAAM,MAAM,SAAS,GAClB,KAAK,GACL,SAAS,GACT,KAAK,GACL,UAAU,GACV,cAAc,GACd,cAAc,GACd,UAAU,CAAC;AAEd;;;;;GAKG;AACH,qBAAa,UAAW,SAAQ,KAAK;IACpC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAEzB,YAAY,IAAI,EAAE,SAAS,EAI1B;CACD"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * `@softistx/janus-social` — the providers `@softistx/janus` signs people in
3
+ * with when they come from somewhere else, on oauth4webapi:
4
+ *
5
+ * - `google()`, `github()`, `microsoft()` and `oidcStepUp()`: the presets, each a few
6
+ * options (client id and secret, the redirect URI);
7
+ * - `oidcProvider()`: any OpenID Connect provider, by its issuer;
8
+ * - `oauth2Provider()`: a plain OAuth 2.0 provider, with the `identity` that
9
+ * reads its account.
10
+ *
11
+ * Each answers the core's `SocialProvider`; put them under a user type's
12
+ * `social.providers`. This package defines no error class: a refusal is the
13
+ * core's `SocialError` (`PROVIDER_ERROR`), with a `reason` for logs.
14
+ */
15
+ export * from './connections/index';
16
+ export { github } from './github';
17
+ export { google } from './google';
18
+ export { microsoft } from './microsoft';
19
+ export { oauth2Provider } from './oauth2';
20
+ export { oidcProvider } from './oidc';
21
+ export { oidcStepUp } from './oidc-step-up';
22
+ export type { DpopAlgorithm, GithubOptions, GoogleOptions, MicrosoftOptions, OAuth2Identity, OAuth2ProviderOptions, OidcProviderOptions, OidcSecurityOptions, OidcStepUpOptions, ProviderCredentials, SocialFetch, } from './options';
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EACX,aAAa,EACb,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,GACX,MAAM,WAAW,CAAC"}