@ttoss/http-server-auth 0.11.0 → 0.12.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/README.md CHANGED
@@ -172,7 +172,7 @@ path when the app versions its API; individual paths are overridable through
172
172
 
173
173
  ## OAuth authorization server
174
174
 
175
- The package also ships `oauthServer()` — a Koa `Router` that issues tokens (`/authorize`, `/token`, `/register`, discovery), a thin adapter over `createOAuthHandlers` from [`@ttoss/auth-core`](https://ttoss.dev/docs/modules/packages/auth-core). Pair it with the `oauth` verification strategy above when one deployment both issues and verifies. See the [OAuth Authorization Server](https://ttoss.dev/docs/engineering/guidelines/oauth-authorization-server) guideline.
175
+ The package also ships `oauthServer()` — a Koa `Router` that issues tokens (`/authorize`, `/token`, `/register`, discovery), a thin adapter over `createOAuthHandlers` from [`@ttoss/auth-core`](https://ttoss.dev/docs/modules/packages/auth-core). Pair it with the `oauth` verification strategy above when one deployment both issues and verifies. The discovery document and `/register` advertise the `refresh_token` grant only when you pass `onRefreshToken`; otherwise they advertise just `authorization_code`, and a registration asking for `refresh_token` has it dropped (or is refused with `invalid_client_metadata` when it asked for nothing else). See the [OAuth Authorization Server](https://ttoss.dev/docs/engineering/guidelines/oauth-authorization-server) guideline.
176
176
 
177
177
  ### Protected resource metadata (RFC 9728)
178
178
 
package/dist/index.cjs CHANGED
@@ -272,8 +272,10 @@ var emailAuth = options => {
272
272
  /**
273
273
  * Mounts an OAuth 2.1 Authorization Server (issuing tokens) as a Koa `Router`,
274
274
  * adapting the runner-agnostic engine from `@ttoss/auth-core`. Exposes the
275
- * authorization endpoint (PKCE S256), token endpoint (`authorization_code` +
276
- * `refresh_token`), Dynamic Client Registration, and discovery metadata.
275
+ * authorization endpoint (PKCE S256), token endpoint (`authorization_code`,
276
+ * plus `refresh_token` when `onRefreshToken` is set), Dynamic Client
277
+ * Registration, and discovery metadata. Discovery and registration advertise
278
+ * `refresh_token` only when `onRefreshToken` is set.
277
279
  *
278
280
  * This is the issuing side of OAuth; pair it with `authMiddleware`'s `oauth`
279
281
  * strategy (the verifying side) when one deployment both issues and verifies.
package/dist/index.d.cts CHANGED
@@ -141,8 +141,10 @@ export declare const emailAuth: (options: EmailAuthOptions$1 & {
141
141
  /**
142
142
  * Mounts an OAuth 2.1 Authorization Server (issuing tokens) as a Koa `Router`,
143
143
  * adapting the runner-agnostic engine from `@ttoss/auth-core`. Exposes the
144
- * authorization endpoint (PKCE S256), token endpoint (`authorization_code` +
145
- * `refresh_token`), Dynamic Client Registration, and discovery metadata.
144
+ * authorization endpoint (PKCE S256), token endpoint (`authorization_code`,
145
+ * plus `refresh_token` when `onRefreshToken` is set), Dynamic Client
146
+ * Registration, and discovery metadata. Discovery and registration advertise
147
+ * `refresh_token` only when `onRefreshToken` is set.
146
148
  *
147
149
  * This is the issuing side of OAuth; pair it with `authMiddleware`'s `oauth`
148
150
  * strategy (the verifying side) when one deployment both issues and verifies.
package/dist/index.d.mts CHANGED
@@ -141,8 +141,10 @@ export declare const emailAuth: (options: EmailAuthOptions$1 & {
141
141
  /**
142
142
  * Mounts an OAuth 2.1 Authorization Server (issuing tokens) as a Koa `Router`,
143
143
  * adapting the runner-agnostic engine from `@ttoss/auth-core`. Exposes the
144
- * authorization endpoint (PKCE S256), token endpoint (`authorization_code` +
145
- * `refresh_token`), Dynamic Client Registration, and discovery metadata.
144
+ * authorization endpoint (PKCE S256), token endpoint (`authorization_code`,
145
+ * plus `refresh_token` when `onRefreshToken` is set), Dynamic Client
146
+ * Registration, and discovery metadata. Discovery and registration advertise
147
+ * `refresh_token` only when `onRefreshToken` is set.
146
148
  *
147
149
  * This is the issuing side of OAuth; pair it with `authMiddleware`'s `oauth`
148
150
  * strategy (the verifying side) when one deployment both issues and verifies.
package/dist/index.mjs CHANGED
@@ -241,8 +241,10 @@ var emailAuth = options => {
241
241
  /**
242
242
  * Mounts an OAuth 2.1 Authorization Server (issuing tokens) as a Koa `Router`,
243
243
  * adapting the runner-agnostic engine from `@ttoss/auth-core`. Exposes the
244
- * authorization endpoint (PKCE S256), token endpoint (`authorization_code` +
245
- * `refresh_token`), Dynamic Client Registration, and discovery metadata.
244
+ * authorization endpoint (PKCE S256), token endpoint (`authorization_code`,
245
+ * plus `refresh_token` when `onRefreshToken` is set), Dynamic Client
246
+ * Registration, and discovery metadata. Discovery and registration advertise
247
+ * `refresh_token` only when `onRefreshToken` is set.
246
248
  *
247
249
  * This is the issuing side of OAuth; pair it with `authMiddleware`'s `oauth`
248
250
  * strategy (the verifying side) when one deployment both issues and verifies.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/http-server-auth",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Authentication middleware for @ttoss/http-server",
5
5
  "keywords": [
6
6
  "auth",
@@ -32,7 +32,7 @@
32
32
  "dist"
33
33
  ],
34
34
  "dependencies": {
35
- "@ttoss/auth-core": "^0.21.0"
35
+ "@ttoss/auth-core": "^0.22.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/koa": "^3.0.3",