@crossauth/fastify 0.0.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.
Files changed (35) hide show
  1. package/LICENSE +203 -0
  2. package/README.md +12 -0
  3. package/dist/fastifyadminclientendpoints.d.ts +149 -0
  4. package/dist/fastifyadminendpoints.d.ts +126 -0
  5. package/dist/fastifyapikey.d.ts +42 -0
  6. package/dist/fastifyoauthclient.d.ts +429 -0
  7. package/dist/fastifyoauthserver.d.ts +248 -0
  8. package/dist/fastifyresserver.d.ts +93 -0
  9. package/dist/fastifyserver.d.ts +293 -0
  10. package/dist/fastifysession.d.ts +767 -0
  11. package/dist/fastifysessionadapter.d.ts +48 -0
  12. package/dist/fastifyuserclientendpoints.d.ts +61 -0
  13. package/dist/fastifyuserendpoints.d.ts +193 -0
  14. package/dist/index.cjs +9085 -0
  15. package/dist/index.d.ts +40 -0
  16. package/dist/index.js +9085 -0
  17. package/dist/tests/admincommon.d.ts +20 -0
  18. package/dist/tests/fastifyadminapiendpoints.test.d.ts +13 -0
  19. package/dist/tests/fastifyadminclientapiendpoints.test.d.ts +13 -0
  20. package/dist/tests/fastifyadminclientendpoints.test.d.ts +13 -0
  21. package/dist/tests/fastifyadminendpoints.test.d.ts +13 -0
  22. package/dist/tests/fastifyapikeyserver.test.d.ts +13 -0
  23. package/dist/tests/fastifyapiserver.test.d.ts +11 -0
  24. package/dist/tests/fastifyapitwofactor.test.d.ts +11 -0
  25. package/dist/tests/fastifyauthserver.test.d.ts +17 -0
  26. package/dist/tests/fastifyclient.test.d.ts +1 -0
  27. package/dist/tests/fastifymfaclient.test.d.ts +4 -0
  28. package/dist/tests/fastifyresserver.test.d.ts +1 -0
  29. package/dist/tests/fastifysessionserver.test.d.ts +13 -0
  30. package/dist/tests/fastifytwofactorserver.test.d.ts +17 -0
  31. package/dist/tests/fastifyuserclientapiendpoints.test.d.ts +13 -0
  32. package/dist/tests/fastifyuserclientendpoints.test.d.ts +13 -0
  33. package/dist/tests/inmemorytestdata.d.ts +3 -0
  34. package/dist/tests/oauthcommon.d.ts +45 -0
  35. package/package.json +75 -0
@@ -0,0 +1,40 @@
1
+ import { User, ApiKey } from '@crossauth/common';
2
+ export { FastifyServer } from './fastifyserver';
3
+ export type { FastifyServerOptions, FastifyErrorFn } from './fastifyserver';
4
+ export { FastifyApiKeyServer } from './fastifyapikey';
5
+ export type { FastifyApiKeyServerOptions } from './fastifyapikey';
6
+ export { FastifySessionServer } from './fastifysession';
7
+ export type { LoginBodyType, LoginFactor2BodyType, SignupBodyType, } from './fastifysession';
8
+ export type { FastifySessionServerOptions, AuthenticatorDetails, CsrfBodyType } from './fastifysession';
9
+ export { FastifyAuthorizationServer } from './fastifyoauthserver';
10
+ export type { FastifyAuthorizationServerOptions, AuthorizeQueryType, MfaChallengeBodyType, UserAuthorizeBodyType } from './fastifyoauthserver';
11
+ export { FastifyOAuthClient } from './fastifyoauthclient';
12
+ export type { FastifyOAuthClientOptions, ClientAuthorizeQueryType, RedirectUriQueryType, PasswordQueryType, ClientCredentialsBodyType, RefreshTokenBodyType, PasswordBodyType, PasswordOtpType, PasswordOobType, DeviceCodeFlowResponse } from './fastifyoauthclient';
13
+ export { FastifyOAuthResourceServer } from './fastifyresserver';
14
+ export type { FastifyOAuthResourceServerOptions } from './fastifyresserver';
15
+ export { FastifyAdminClientEndpoints } from './fastifyadminclientendpoints';
16
+ export type { SelectClientQueryType, CreateClientQueryType, CreateClientBodyType, UpdateClientQueryType, UpdateClientBodyType, DeleteClientParamType, UpdateClientParamType, DeleteClientQueryType, } from './fastifyadminclientendpoints';
17
+ export { FastifyAdminEndpoints } from './fastifyadminendpoints';
18
+ export type { AdminChangePasswordBodyType, AdminCreateUserBodyType, AdminDeleteUserParamType, AdminUpdateUserBodyType } from './fastifyadminendpoints';
19
+ export { FastifyUserEndpoints } from './fastifyuserendpoints';
20
+ export type { UpdateUserBodyType, ChangeFactor2QueryType, ChangeFactor2BodyType, ChangePasswordQueryType, ChangePasswordBodyType, ConfigureFactor2QueryType, ConfigureFactor2BodyType, RequestPasswordResetQueryType, RequestPasswordResetBodyType, ResetPasswordBodyType, VerifyTokenParamType, } from './fastifyuserendpoints';
21
+ export { FastifyUserClientEndpoints } from './fastifyuserclientendpoints';
22
+ export { FastifySessionAdapter } from './fastifysessionadapter';
23
+ declare module 'fastify' {
24
+ interface FastifyRequest {
25
+ user: User | undefined;
26
+ csrfToken: string | undefined;
27
+ sessionId: string | undefined;
28
+ apiKey: ApiKey;
29
+ authType: "cookie" | "oauth" | "oidc" | "apiKey" | undefined;
30
+ scope: string[] | undefined;
31
+ accessTokenPayload: {
32
+ [key: string]: any;
33
+ } | undefined;
34
+ idTokenPayload: {
35
+ [key: string]: any;
36
+ } | undefined;
37
+ authError: string | undefined;
38
+ authErrorDescription: string | undefined;
39
+ }
40
+ }