@riligar/auth-elysia 1.4.1 → 1.4.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.
- package/dist/index.esm.js +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/src/index.js +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -276,11 +276,11 @@ function authPlugin(userConfig = {}) {
|
|
|
276
276
|
const authClient = new RiLiGarAuthClient(config.apiUrl, config.secretKey);
|
|
277
277
|
|
|
278
278
|
return new Elysia({ name: 'auth-plugin' })
|
|
279
|
-
.
|
|
279
|
+
.onBeforeHandle(createAuthMiddleware(config, authClient))
|
|
280
|
+
.resolve(({ request }) => ({
|
|
280
281
|
user: request.user || null,
|
|
281
282
|
authMeta: request.authMeta || null,
|
|
282
283
|
}))
|
|
283
|
-
.onBeforeHandle(createAuthMiddleware(config, authClient))
|
|
284
284
|
.group(config.prefix, app =>
|
|
285
285
|
app
|
|
286
286
|
// Rota de login
|
package/dist/index.js
CHANGED
|
@@ -280,11 +280,11 @@ function authPlugin(userConfig = {}) {
|
|
|
280
280
|
const authClient = new RiLiGarAuthClient(config.apiUrl, config.secretKey);
|
|
281
281
|
|
|
282
282
|
return new elysia.Elysia({ name: 'auth-plugin' })
|
|
283
|
-
.
|
|
283
|
+
.onBeforeHandle(createAuthMiddleware(config, authClient))
|
|
284
|
+
.resolve(({ request }) => ({
|
|
284
285
|
user: request.user || null,
|
|
285
286
|
authMeta: request.authMeta || null,
|
|
286
287
|
}))
|
|
287
|
-
.onBeforeHandle(createAuthMiddleware(config, authClient))
|
|
288
288
|
.group(config.prefix, app =>
|
|
289
289
|
app
|
|
290
290
|
// Rota de login
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -275,11 +275,11 @@ export function authPlugin(userConfig = {}) {
|
|
|
275
275
|
const authClient = new RiLiGarAuthClient(config.apiUrl, config.secretKey)
|
|
276
276
|
|
|
277
277
|
return new Elysia({ name: 'auth-plugin' })
|
|
278
|
-
.
|
|
278
|
+
.onBeforeHandle(createAuthMiddleware(config, authClient))
|
|
279
|
+
.resolve(({ request }) => ({
|
|
279
280
|
user: request.user || null,
|
|
280
281
|
authMeta: request.authMeta || null,
|
|
281
282
|
}))
|
|
282
|
-
.onBeforeHandle(createAuthMiddleware(config, authClient))
|
|
283
283
|
.group(config.prefix, app =>
|
|
284
284
|
app
|
|
285
285
|
// Rota de login
|