@openape/nuxt-auth-sp 0.1.7 → 0.1.8
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/module.json +1 -1
- package/dist/module.mjs +23 -2
- package/dist/runtime/middleware/openape-auth.d.ts +1 -1
- package/dist/runtime/server/api/callback.get.js +0 -2
- package/dist/runtime/server/api/login.post.js +0 -1
- package/dist/runtime/server/api/logout.post.js +0 -1
- package/dist/runtime/server/api/me.get.js +0 -1
- package/dist/runtime/server/routes/well-known/sp-manifest.json.get.js +0 -1
- package/dist/runtime/server/utils/sp-config.js +2 -0
- package/dist/runtime/server/utils/sp-session.d.ts +3 -1
- package/dist/runtime/server/utils/sp-session.js +2 -0
- package/package.json +8 -8
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { defineNuxtModule, createResolver, addServerImportsDir, addImportsDir,
|
|
1
|
+
import { defineNuxtModule, createResolver, addServerImportsDir, addImportsDir, addTemplate, addServerHandler } from '@nuxt/kit';
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
2
3
|
import { defu } from 'defu';
|
|
3
4
|
|
|
4
5
|
const module = defineNuxtModule({
|
|
@@ -21,7 +22,27 @@ const module = defineNuxtModule({
|
|
|
21
22
|
);
|
|
22
23
|
addServerImportsDir(resolve("./runtime/server/utils"));
|
|
23
24
|
addImportsDir(resolve("./runtime/composables"));
|
|
24
|
-
|
|
25
|
+
const handlers = [
|
|
26
|
+
{ route: "/api/login", method: "post", src: "api/login.post.js" },
|
|
27
|
+
{ route: "/api/callback", method: void 0, src: "api/callback.get.js" },
|
|
28
|
+
{ route: "/api/logout", method: "post", src: "api/logout.post.js" },
|
|
29
|
+
{ route: "/api/me", method: void 0, src: "api/me.get.js" },
|
|
30
|
+
{ route: "/.well-known/sp-manifest.json", method: void 0, src: "routes/well-known/sp-manifest.json.get.js" }
|
|
31
|
+
];
|
|
32
|
+
for (const h of handlers) {
|
|
33
|
+
const srcPath = resolve(`./runtime/server/${h.src}`);
|
|
34
|
+
const destFilename = `openape-sp/${h.src}`;
|
|
35
|
+
addTemplate({
|
|
36
|
+
filename: destFilename,
|
|
37
|
+
write: true,
|
|
38
|
+
getContents: () => readFileSync(srcPath, "utf-8")
|
|
39
|
+
});
|
|
40
|
+
addServerHandler({
|
|
41
|
+
route: h.route,
|
|
42
|
+
method: h.method,
|
|
43
|
+
handler: resolve(nuxt.options.buildDir, destFilename)
|
|
44
|
+
});
|
|
45
|
+
}
|
|
25
46
|
}
|
|
26
47
|
});
|
|
27
48
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("
|
|
1
|
+
declare const _default: import("nuxt/app").RouteMiddleware;
|
|
2
2
|
export default _default;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { handleCallback } from "@openape/auth";
|
|
2
|
-
import { getFlowState, getSpConfig, clearFlowState } from "../utils/sp-config.js";
|
|
3
|
-
import { getSpSession } from "../utils/sp-session.js";
|
|
4
2
|
export default defineEventHandler(async (event) => {
|
|
5
3
|
const query = getQuery(event);
|
|
6
4
|
const { code, state, error, error_description } = query;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createAuthorizationURL, discoverIdP } from "@openape/auth";
|
|
2
|
-
import { getSpConfig, saveFlowState } from "../utils/sp-config.js";
|
|
3
2
|
export default defineEventHandler(async (event) => {
|
|
4
3
|
const body = await readBody(event);
|
|
5
4
|
const { spId, openapeUrl, fallbackIdpUrl } = getSpConfig();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openape/nuxt-auth-sp",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.8",
|
|
5
5
|
"description": "OpenAPE Service Provider Nuxt module — adds OIDC login via DNS-based IdP discovery",
|
|
6
6
|
"author": "Delta Mind GmbH",
|
|
7
7
|
"license": "AGPL-3.0-or-later",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"release": "npm pack --dry-run && npm publish --provenance --access public"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@nuxt/kit": "^3.
|
|
31
|
+
"@nuxt/kit": "^3.21.1",
|
|
32
32
|
"@openape/auth": "^0.1.2",
|
|
33
33
|
"@openape/core": "^0.1.2",
|
|
34
34
|
"defu": "^6.1.4"
|
|
@@ -37,15 +37,15 @@
|
|
|
37
37
|
"nuxt": "^4.0.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
+
"@antfu/eslint-config": "^7.6.1",
|
|
41
|
+
"@changesets/cli": "^2.30.0",
|
|
40
42
|
"@nuxt/module-builder": "^0.8.4",
|
|
41
|
-
"@types/node": "^22.
|
|
43
|
+
"@types/node": "^22.19.13",
|
|
44
|
+
"eslint": "^9.39.3",
|
|
42
45
|
"nuxt": "^4.3.1",
|
|
43
|
-
"typescript": "^5.
|
|
44
|
-
"vue-tsc": "^3.2.0",
|
|
45
|
-
"@antfu/eslint-config": "^7.6.1",
|
|
46
|
-
"eslint": "^9.35.0",
|
|
46
|
+
"typescript": "^5.9.3",
|
|
47
47
|
"vitest": "^3.2.4",
|
|
48
|
-
"
|
|
48
|
+
"vue-tsc": "^3.2.5"
|
|
49
49
|
},
|
|
50
50
|
"engines": {
|
|
51
51
|
"node": ">=22"
|