@webda/auth 0.0.0-stage → 4.0.0-beta.11

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 (77) hide show
  1. package/LICENSE +166 -0
  2. package/README.md +59 -2
  3. package/lib/authentication.service.d.ts +322 -0
  4. package/lib/authentication.service.d.ts.map +1 -0
  5. package/lib/authentication.service.js +978 -0
  6. package/lib/authentication.service.js.map +1 -0
  7. package/lib/certificate/certificate.service.d.ts +139 -0
  8. package/lib/certificate/certificate.service.d.ts.map +1 -0
  9. package/lib/certificate/certificate.service.js +343 -0
  10. package/lib/certificate/certificate.service.js.map +1 -0
  11. package/lib/compat/upgrade.d.ts +71 -0
  12. package/lib/compat/upgrade.d.ts.map +1 -0
  13. package/lib/compat/upgrade.js +200 -0
  14. package/lib/compat/upgrade.js.map +1 -0
  15. package/lib/email/emailpassword.service.d.ts +249 -0
  16. package/lib/email/emailpassword.service.d.ts.map +1 -0
  17. package/lib/email/emailpassword.service.js +714 -0
  18. package/lib/email/emailpassword.service.js.map +1 -0
  19. package/lib/email/tokens.d.ts +36 -0
  20. package/lib/email/tokens.d.ts.map +1 -0
  21. package/lib/email/tokens.js +46 -0
  22. package/lib/email/tokens.js.map +1 -0
  23. package/lib/errors.d.ts +53 -0
  24. package/lib/errors.d.ts.map +1 -0
  25. package/lib/errors.js +74 -0
  26. package/lib/errors.js.map +1 -0
  27. package/lib/index.d.ts +12 -0
  28. package/lib/index.d.ts.map +1 -0
  29. package/lib/index.js +12 -0
  30. package/lib/index.js.map +1 -0
  31. package/lib/mfa/secondfactor.service.d.ts +44 -0
  32. package/lib/mfa/secondfactor.service.d.ts.map +1 -0
  33. package/lib/mfa/secondfactor.service.js +38 -0
  34. package/lib/mfa/secondfactor.service.js.map +1 -0
  35. package/lib/mfa/totp.service.d.ts +41 -0
  36. package/lib/mfa/totp.service.d.ts.map +1 -0
  37. package/lib/mfa/totp.service.js +63 -0
  38. package/lib/mfa/totp.service.js.map +1 -0
  39. package/lib/oauth/oauth.service.d.ts +296 -0
  40. package/lib/oauth/oauth.service.d.ts.map +1 -0
  41. package/lib/oauth/oauth.service.js +560 -0
  42. package/lib/oauth/oauth.service.js.map +1 -0
  43. package/lib/provider.d.ts +53 -0
  44. package/lib/provider.d.ts.map +1 -0
  45. package/lib/provider.js +55 -0
  46. package/lib/provider.js.map +1 -0
  47. package/lib/test/authtest.d.ts +39 -0
  48. package/lib/test/authtest.d.ts.map +1 -0
  49. package/lib/test/authtest.js +62 -0
  50. package/lib/test/authtest.js.map +1 -0
  51. package/lib/test/emailtest.d.ts +25 -0
  52. package/lib/test/emailtest.d.ts.map +1 -0
  53. package/lib/test/emailtest.js +42 -0
  54. package/lib/test/emailtest.js.map +1 -0
  55. package/lib/test/fakeoauth.service.d.ts +45 -0
  56. package/lib/test/fakeoauth.service.d.ts.map +1 -0
  57. package/lib/test/fakeoauth.service.js +78 -0
  58. package/lib/test/fakeoauth.service.js.map +1 -0
  59. package/lib/test/mfauser.fixture.model.d.ts +11 -0
  60. package/lib/test/mfauser.fixture.model.d.ts.map +1 -0
  61. package/lib/test/mfauser.fixture.model.js +44 -0
  62. package/lib/test/mfauser.fixture.model.js.map +1 -0
  63. package/lib/test/stubprovider.d.ts +35 -0
  64. package/lib/test/stubprovider.d.ts.map +1 -0
  65. package/lib/test/stubprovider.js +46 -0
  66. package/lib/test/stubprovider.js.map +1 -0
  67. package/lib/test/v3.d.ts +29 -0
  68. package/lib/test/v3.d.ts.map +1 -0
  69. package/lib/test/v3.js +47 -0
  70. package/lib/test/v3.js.map +1 -0
  71. package/lib/throttle.d.ts +41 -0
  72. package/lib/throttle.d.ts.map +1 -0
  73. package/lib/throttle.js +49 -0
  74. package/lib/throttle.js.map +1 -0
  75. package/package.json +69 -3
  76. package/test/config.json +23 -0
  77. package/webda.module.json +891 -0
@@ -0,0 +1,296 @@
1
+ import { type AsyncEventUnknown, type AuthResult, type ProviderInfo, type ResolvedIdentity, SecretString, Service, ServiceParameters, type WebContext } from "@webda/core";
2
+ import { type AuthProvider } from "../provider.js";
3
+ /**
4
+ * Credentials as returned by an OAuth token endpoint (google-auth-library `Credentials` shape): `id_token`,
5
+ * `access_token`, `refresh_token`, `expiry_date`, `token_type`, `scope`... Values are not typed by the schema
6
+ * (providers send nulls); providers check what they use.
7
+ */
8
+ export interface OAuthTokens {
9
+ /** Any provider field */
10
+ [key: string]: any;
11
+ }
12
+ /**
13
+ * Input of the `Auth.<Provider>.Token` operations: `token`, or the provider credentials `tokens`
14
+ * @WebdaSchema
15
+ */
16
+ export interface OAuthTokenRequest {
17
+ /**
18
+ * Token issued by the provider to the client (an ID token for OpenID Connect providers)
19
+ */
20
+ token?: string;
21
+ /**
22
+ * Credentials obtained by the client from the provider (v3 body; its `id_token` is verified)
23
+ */
24
+ tokens?: OAuthTokens;
25
+ }
26
+ /** Parameters of an authorization request */
27
+ export interface OAuthAuthorizationRequest {
28
+ /** Random state to send back on the callback */
29
+ state: string;
30
+ /** Callback url */
31
+ redirectUri: string;
32
+ /** Scopes to request */
33
+ scope: string[];
34
+ /** PKCE code challenge (base64url SHA-256 of the verifier) */
35
+ codeChallenge: string;
36
+ /** PKCE method */
37
+ codeChallengeMethod: "S256";
38
+ /** OpenID Connect nonce: the ID token of the callback must carry it */
39
+ nonce: string;
40
+ }
41
+ /** Parameters of a code exchange */
42
+ export interface OAuthCallbackRequest {
43
+ /** Authorization code */
44
+ code: string;
45
+ /** redirect_uri of the authorization request */
46
+ redirectUri: string;
47
+ /** PKCE code verifier */
48
+ codeVerifier: string;
49
+ /** Nonce of the authorization request: providers returning an ID token must check it */
50
+ nonce: string;
51
+ }
52
+ /** Browser redirects of the OAuth callback */
53
+ export interface OAuthRedirects {
54
+ /**
55
+ * Where a successful login lands when the login did not carry an allowed `redirect` parameter
56
+ * @default "/"
57
+ */
58
+ success: string;
59
+ /**
60
+ * Where a failed login or callback lands, with `?reason=<CODE>` (required)
61
+ */
62
+ failure?: string;
63
+ }
64
+ /** OAuthProvider parameters */
65
+ export declare class OAuthProviderParameters extends ServiceParameters {
66
+ /**
67
+ * Route prefix of the login (`<url>`) and callback (`<url>/callback`) routes
68
+ * @default "/auth/<providerName>"
69
+ */
70
+ url?: string;
71
+ /**
72
+ * OAuth client id
73
+ */
74
+ client_id: string;
75
+ /**
76
+ * OAuth client secret
77
+ *
78
+ * Can be encrypted with `webda config encrypt`
79
+ */
80
+ client_secret?: string | SecretString;
81
+ /**
82
+ * Scopes requested from the provider (the default depends on the provider)
83
+ */
84
+ scope?: string[];
85
+ /**
86
+ * Callback url registered at the provider
87
+ * @default "<absolute url of the request>/callback"; set it explicitly behind a proxy
88
+ */
89
+ redirect_uri?: string;
90
+ /**
91
+ * Allowed post-login targets for the `redirect` query parameter of the login route: absolute http(s) urls, a
92
+ * target matches when it has the same origin and its path is the listed path or below it
93
+ * @default []
94
+ */
95
+ authorized_uris: string[];
96
+ /**
97
+ * Browser redirects of the callback
98
+ * @default { "success": "/" }
99
+ */
100
+ redirects: OAuthRedirects;
101
+ /** Only these email domains may use this provider (see ProviderEmailPolicy) */
102
+ allowedEmailDomains?: string[];
103
+ /** Whether the verification of the email is believed (see ProviderEmailPolicy) */
104
+ trustEmailVerification?: boolean | string[];
105
+ /**
106
+ * @param params - raw parameters
107
+ * @returns this
108
+ */
109
+ load(params?: any): this;
110
+ }
111
+ /** Pending login, kept in an encrypted cookie between the login and the callback */
112
+ interface PendingLogin {
113
+ /** Provider that started it */
114
+ provider: string;
115
+ /** Random state sent to the provider */
116
+ state: string;
117
+ /** PKCE code verifier */
118
+ verifier: string;
119
+ /** OpenID Connect nonce */
120
+ nonce: string;
121
+ /** Post-login target, already checked against authorized_uris */
122
+ redirect?: string;
123
+ /** redirect_uri sent to the provider: the code exchange must use the same */
124
+ redirectUri: string;
125
+ /** Expiry timestamp (ms) */
126
+ expires: number;
127
+ }
128
+ /**
129
+ * Loggable reason of an error: library messages may contain tokens or their payload, so only a short code or the
130
+ * error class name is kept
131
+ * @param err - any error
132
+ * @returns a reason without any part of the message
133
+ */
134
+ export declare function safeErrorReason(err: any): string;
135
+ /**
136
+ * Keep only the known credentials keys, as bounded strings or finite numbers
137
+ * @param tokens - client provided credentials
138
+ * @returns the sanitised credentials
139
+ */
140
+ export declare function sanitizeTokens(tokens: OAuthTokens): OAuthTokens;
141
+ /**
142
+ * Base of the OAuth 2.0 / OpenID Connect login providers
143
+ *
144
+ * Exposes, under `url` (default `/auth/<providerName>`):
145
+ * - `GET <url>{?redirect}`: starts a login with a random `state`, a PKCE (S256) verifier and an OpenID `nonce`, kept
146
+ * in a dedicated encrypted cookie (10 min, HttpOnly, SameSite=Lax, path `url`), then redirects to the provider;
147
+ * `redirect` must match `authorized_uris`
148
+ * - `GET <url>/callback`: consumes that cookie, checks the state, exchanges the code (`handleCallback`) and hands
149
+ * the identity to `Authentication.complete()`; never throws, failures go to `redirects.failure?reason=<CODE>`
150
+ * - operation `Auth.<Provider>.Token` (`POST auth/<providerName>/token`, JSON body `{ token }` or `{ tokens }`) for
151
+ * non-browser clients; it never links an identity to the session user
152
+ *
153
+ * Subclasses implement `providerName`, `getAuthorizationUrl`, `handleCallback` and `handleToken`; the provider of the
154
+ * returned identities is always forced to `providerName`.
155
+ */
156
+ export declare abstract class OAuthProvider<T extends OAuthProviderParameters = OAuthProviderParameters, E extends AsyncEventUnknown = {}> extends Service<T, E> implements AuthProvider {
157
+ static Parameters: typeof OAuthProviderParameters;
158
+ /** Unique provider name, used in ident keys ("google") */
159
+ abstract readonly providerName: string;
160
+ /**
161
+ * Build the authorization url of the provider, sending the PKCE challenge and the nonce
162
+ * @param request - authorization request
163
+ * @returns the url to redirect the browser to
164
+ */
165
+ abstract getAuthorizationUrl(request: OAuthAuthorizationRequest): string | Promise<string>;
166
+ /**
167
+ * Exchange an authorization code (with the PKCE verifier) and verify the result, including the nonce of an ID
168
+ * token
169
+ * @param request - code exchange
170
+ * @returns the identity proven by the provider
171
+ * @throws an HttpError (for example TokenInvalid) whose code is used as the failure reason
172
+ */
173
+ abstract handleCallback(request: OAuthCallbackRequest): Promise<ResolvedIdentity>;
174
+ /**
175
+ * Verify a token presented by a non-browser client
176
+ * @param request - `token` and/or `tokens` (at least one is present)
177
+ * @returns the identity proven by the provider
178
+ * @throws TokenInvalid when the token cannot be verified
179
+ */
180
+ abstract handleToken(request: OAuthTokenRequest): Promise<ResolvedIdentity>;
181
+ /**
182
+ * Called after a successful `Authentication.complete()` (status ok or mfa_required)
183
+ * @param _identity - the identity
184
+ * @param _result - the result
185
+ * @param _source - browser callback or token operation
186
+ * @param _request - the token operation request (token operation only)
187
+ */
188
+ protected onAuthenticated(_identity: ResolvedIdentity, _result: AuthResult, _source: "callback" | "token", _request?: OAuthTokenRequest): Promise<void>;
189
+ /**
190
+ * @returns false when the provider works without client secret (public clients)
191
+ */
192
+ protected requiresClientSecret(): boolean;
193
+ /**
194
+ * @returns the name of the pending login cookie
195
+ */
196
+ protected getCookieName(): string;
197
+ /** @override */
198
+ resolve(): this;
199
+ /** @override */
200
+ init(): Promise<this>;
201
+ /**
202
+ * Register `Auth.<Provider>.Token`: its id and path depend on the provider name
203
+ * @override
204
+ */
205
+ initOperations(): void;
206
+ /**
207
+ * @returns public info
208
+ */
209
+ getPublicInfo(): ProviderInfo;
210
+ /**
211
+ * Log in with a token obtained by the client from the provider
212
+ *
213
+ * Requires a JSON request (a cross-site form or `text/plain` POST is refused). A request carrying a logged-in
214
+ * session never links the identity to that user: an identity owned by another user is refused
215
+ * (IDENT_LINKED_ELSEWHERE), a new or unowned one gets a fresh session.
216
+ * @param token - token (an ID token for OpenID Connect providers)
217
+ * @param tokens - credentials obtained from the provider (v3 body)
218
+ * @returns the auth result
219
+ */
220
+ token(token?: string, tokens?: OAuthTokens): Promise<AuthResult>;
221
+ /**
222
+ * Refuse a request that is not JSON: cross-site requests can only send form or `text/plain` bodies without a
223
+ * preflight
224
+ * @param ctx - operation context
225
+ * @throws UnsupportedMediaType when the HTTP request is not `application/json`
226
+ */
227
+ protected requireJson(ctx: any): void;
228
+ /**
229
+ * The token operation never links: with a logged-in session, an identity owned by another user is refused and a
230
+ * new or unowned one starts a fresh session
231
+ * @param ctx - operation context
232
+ * @param identity - verified identity
233
+ * @throws IdentLinkedElsewhere when the identity belongs to another user than the session one
234
+ */
235
+ protected leaveForeignSession(ctx: any, identity: ResolvedIdentity): Promise<void>;
236
+ /**
237
+ * @param identity - identity returned by the subclass
238
+ * @returns the identity
239
+ * @throws TokenInvalid when it has no subject
240
+ */
241
+ protected checkIdentity(identity: ResolvedIdentity): ResolvedIdentity;
242
+ /**
243
+ * @param identity - identity returned by the subclass
244
+ * @returns the identity, always attributed to this provider
245
+ */
246
+ protected ownIdentity(identity: ResolvedIdentity): ResolvedIdentity;
247
+ /**
248
+ * Check a post-login target against `authorized_uris`: same origin, and the listed path or below it; an encoded
249
+ * slash or backslash in the path is refused
250
+ * @param redirect - candidate
251
+ * @returns the normalised url, undefined when not allowed
252
+ */
253
+ protected allowedRedirect(redirect: unknown): string | undefined;
254
+ /**
255
+ * @param ctx - web context
256
+ * @returns the callback url sent to the provider
257
+ */
258
+ protected getRedirectUri(ctx: WebContext): string;
259
+ /**
260
+ * Set (or clear, without value) the pending login cookie, scoped to the callback path: the path of the effective
261
+ * redirect_uri, which includes any deployment prefix (API Gateway stage, path-stripping proxy) the routes do not see
262
+ * @param ctx - web context
263
+ * @param redirectUri - callback url
264
+ * @param value - encrypted pending login
265
+ */
266
+ protected sendPendingCookie(ctx: WebContext, redirectUri: string, value?: string): void;
267
+ /**
268
+ * Read and clear the pending login cookie
269
+ * @param ctx - web context
270
+ * @returns the pending login, undefined when absent, invalid, expired or of another provider
271
+ */
272
+ protected consumePending(ctx: WebContext): Promise<PendingLogin | undefined>;
273
+ /**
274
+ * Redirect without caching
275
+ * @param ctx - web context
276
+ * @param url - target
277
+ */
278
+ protected redirect(ctx: WebContext, url: string): void;
279
+ /**
280
+ * @param ctx - web context
281
+ * @param reason - failure code
282
+ */
283
+ protected fail(ctx: WebContext, reason: string): void;
284
+ /**
285
+ * Start a login: redirect the browser to the provider
286
+ * @param ctx - web context
287
+ */
288
+ login(ctx: WebContext): Promise<void>;
289
+ /**
290
+ * Provider callback: verify the state, exchange the code, complete the login and redirect; never throws
291
+ * @param ctx - web context
292
+ */
293
+ callback(ctx: WebContext): Promise<void>;
294
+ }
295
+ export {};
296
+ //# sourceMappingURL=oauth.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth.service.d.ts","sourceRoot":"","sources":["../../src/oauth/oauth.service.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,UAAU,EAEf,KAAK,YAAY,EACjB,KAAK,gBAAgB,EAGrB,YAAY,EAIZ,OAAO,EACP,iBAAiB,EAIjB,KAAK,UAAU,EAEhB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,KAAK,YAAY,EAAqB,MAAM,gBAAgB,CAAC;AAGtE;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,yBAAyB;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,6CAA6C;AAC7C,MAAM,WAAW,yBAAyB;IACxC,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,wBAAwB;IACxB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,8DAA8D;IAC9D,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB;IAClB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;CACf;AAED,oCAAoC;AACpC,MAAM,WAAW,oBAAoB;IACnC,yBAAyB;IACzB,IAAI,EAAE,MAAM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