@softistx/janus-hono 0.0.0-stage → 0.11.34
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/LICENSE +21 -0
- package/README.md +547 -2
- package/dist/bind.d.ts +104 -0
- package/dist/bind.d.ts.map +1 -0
- package/dist/device.d.ts +15 -0
- package/dist/device.d.ts.map +1 -0
- package/dist/errors.d.ts +60 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/fresh.d.ts +41 -0
- package/dist/fresh.d.ts.map +1 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +496 -0
- package/dist/index.js.map +22 -0
- package/dist/no-store.d.ts +8 -0
- package/dist/no-store.d.ts.map +1 -0
- package/dist/passkeys/body.d.ts +12 -0
- package/dist/passkeys/body.d.ts.map +1 -0
- package/dist/passkeys/index.d.ts +8 -0
- package/dist/passkeys/index.d.ts.map +1 -0
- package/dist/passkeys/routes.d.ts +32 -0
- package/dist/passkeys/routes.d.ts.map +1 -0
- package/dist/passkeys/types.d.ts +105 -0
- package/dist/passkeys/types.d.ts.map +1 -0
- package/dist/permission.d.ts +80 -0
- package/dist/permission.d.ts.map +1 -0
- package/dist/provide.d.ts +19 -0
- package/dist/provide.d.ts.map +1 -0
- package/dist/session.d.ts +156 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/social/index.d.ts +9 -0
- package/dist/social/index.d.ts.map +1 -0
- package/dist/social/redirect.d.ts +9 -0
- package/dist/social/redirect.d.ts.map +1 -0
- package/dist/social/refusals.d.ts +14 -0
- package/dist/social/refusals.d.ts.map +1 -0
- package/dist/social/routes.d.ts +32 -0
- package/dist/social/routes.d.ts.map +1 -0
- package/dist/social/types.d.ts +90 -0
- package/dist/social/types.d.ts.map +1 -0
- package/docs/README.md +15 -0
- package/docs/guide/permissions.md +225 -0
- package/docs/guide/routes.md +1164 -0
- package/docs/roadmap.md +76 -0
- package/docs/troubleshooting.md +871 -0
- package/package.json +62 -5
package/docs/roadmap.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Roadmap
|
|
2
|
+
|
|
3
|
+
Where `@softistx/janus-hono` is heading. A direction, not a commitment: there are
|
|
4
|
+
no dates here, and the version something shipped in is the only number.
|
|
5
|
+
|
|
6
|
+
## Now
|
|
7
|
+
|
|
8
|
+
Nothing yet.
|
|
9
|
+
|
|
10
|
+
## Next
|
|
11
|
+
|
|
12
|
+
Nothing yet.
|
|
13
|
+
|
|
14
|
+
## Later
|
|
15
|
+
|
|
16
|
+
Nothing yet.
|
|
17
|
+
|
|
18
|
+
## Not planned
|
|
19
|
+
|
|
20
|
+
- **A middleware that guesses the object** — `permission()` takes a `load`
|
|
21
|
+
and never picks a path parameter or a table for you: the application knows
|
|
22
|
+
where its objects live. `byParam('id', find)` reads the parameter it is
|
|
23
|
+
named, with the `find` it is given.
|
|
24
|
+
- **Routes of its own** — no `/sign-in` mounted for you. Every application
|
|
25
|
+
names, validates and answers its routes its own way; the flows are one call
|
|
26
|
+
each. The exceptions are `socialRoutes()`, a redirect protocol with no body
|
|
27
|
+
for an application to shape, and `passkeyRoutes()`, whose bodies are the
|
|
28
|
+
browser's WebAuthn JSON, passed through untouched.
|
|
29
|
+
- **Body validation** — the shape of a request body is the route's to check,
|
|
30
|
+
with Hono's validator or your own. `janus()` validates the fields against
|
|
31
|
+
your schema, not that `password` is a string.
|
|
32
|
+
- **Error classes of its own** — it throws nothing but `@softistx/janus`'s, which
|
|
33
|
+
is why `@softistx/janus` is a required peer and never a dependency.
|
|
34
|
+
- **`moduleResolution: "nodenext"`** — like `@softistx/janus`, the package imports
|
|
35
|
+
without extensions. Use `"moduleResolution": "bundler"`.
|
|
36
|
+
|
|
37
|
+
## Shipped
|
|
38
|
+
|
|
39
|
+
Newest first; the [CHANGELOG](../CHANGELOG.md) holds every release.
|
|
40
|
+
|
|
41
|
+
- **Passkey routes** — 0.11.0. `passkeyRoutes(auth)`: opt-in JSON routes to register, manage and answer a sign-in's second factor and a step-up with passkeys.
|
|
42
|
+
- **Social login** — 0.10.0. `socialRoutes(auth, options)` and `j.socialRoutes(options)`: a sub-app whose `GET /:provider` sets the flow cookie and redirects to the provider, and whose `GET /:provider/callback` completes the flow, sends the session cookie and redirects. [#359](https://github.com/softistx/nxgt-janus/issues/359)
|
|
43
|
+
- **Moved to `@softistx` on GitHub Packages** (0.9.0) — formerly
|
|
44
|
+
the `@nxgt` scope on npm; same names under the new scope, published privately.
|
|
45
|
+
|
|
46
|
+
- **A throttled e-mail request's `retryAfter`, v0.7.0** — `janusErrors()`
|
|
47
|
+
and `bodyOf()` answer `@softistx/janus`'s `MAIL_THROTTLED` with 429, `retryAfter`
|
|
48
|
+
in the body and a `Retry-After` header. Needs `@softistx/janus` 0.18.0.
|
|
49
|
+
- **The device cookie, v0.6.0** — `deviceOf(c)` reads the device token a
|
|
50
|
+
browser holds, for a sign-in's `device`, and `sendSession` sets it — or
|
|
51
|
+
sets it again for another 400 days — whenever `@softistx/janus`'s answer
|
|
52
|
+
carries a `deviceToken`: `janus-device` (`DEVICE_COOKIE`), `HttpOnly`,
|
|
53
|
+
`Secure`, `SameSite=Lax`, `Path=/`, changed by `DeviceCookieOptions`.
|
|
54
|
+
`signOut` leaves it. Needs `@softistx/janus` 0.17.0.
|
|
55
|
+
- **The routes of a sign-in link, v0.5.1** — the routes guide's
|
|
56
|
+
[A link sent by e-mail](guide/routes.md#a-link-sent-by-e-mail): a page
|
|
57
|
+
that spends nothing, a `POST` behind `csrf()` that confirms, and the
|
|
58
|
+
second factor's challenge handed on. Needs `@softistx/janus` 0.15.0.
|
|
59
|
+
- **A throttled sign-in's `retryAfter`, v0.5.0** — `janusErrors()` and
|
|
60
|
+
`bodyOf()` answer `@softistx/janus`'s throttled `CREDENTIALS_INVALID` with
|
|
61
|
+
`retryAfter` in the body and a `Retry-After` header. Needs `@softistx/janus`
|
|
62
|
+
0.14.0.
|
|
63
|
+
- **`fresh(maxAge)`, v0.4.0** — a middleware that lets a route run only for
|
|
64
|
+
a session that proved who it is less than `maxAge` ago, signed in or
|
|
65
|
+
confirmed by a step-up; `janusErrors()` answers `STEP_UP_REQUIRED` with
|
|
66
|
+
403. Needs `@softistx/janus` 0.12.0.
|
|
67
|
+
- **The second factor's errors as statuses, v0.3.0** — `janusErrors()`
|
|
68
|
+
answers `CODE_INVALID` with 401 and `attemptsLeft` in the body, and
|
|
69
|
+
`SECOND_FACTOR_NOT_ENROLLED` and `SECOND_FACTOR_ACTIVE` with 409. Needs
|
|
70
|
+
`@softistx/janus` 0.5.0.
|
|
71
|
+
- **Examples and guides on `related` and `permits`, v0.2.0** — the model keys
|
|
72
|
+
of `@softistx/janus` 0.2, which it now requires.
|
|
73
|
+
- **The first release** — `session()`,
|
|
74
|
+
`sendSession` (which answers the user), `signOut`, `permission()` and
|
|
75
|
+
`byParam`, `provide()`, `janusErrors({ report, fallback })`, and
|
|
76
|
+
`bindJanus()` binding them to the instances once. — v0.1
|