@tachybase/plugin-auth-saml 1.6.0 → 1.6.1

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.
@@ -1,12 +1,12 @@
1
1
  module.exports = {
2
2
  "react": "18.3.1",
3
- "@tachybase/client": "1.6.0",
4
- "@tachybase/schema": "1.3.52",
5
- "@ant-design/icons": "5.6.1",
6
- "@tego/client": "1.3.52",
3
+ "@tachybase/client": "1.6.1",
4
+ "@tachybase/schema": "1.6.0-alpha.9",
5
+ "@ant-design/icons": "6.1.0",
6
+ "@tego/client": "1.6.0-alpha.9",
7
7
  "antd": "5.22.5",
8
- "@tachybase/module-auth": "1.6.0",
8
+ "@tachybase/module-auth": "1.6.1",
9
9
  "react-router-dom": "6.28.1",
10
- "@tego/server": "1.3.52",
10
+ "@tego/server": "1.6.0-alpha.9",
11
11
  "react-i18next": "16.2.1"
12
12
  };
@@ -1 +1 @@
1
- {"name":"@node-saml/node-saml","version":"4.0.5","description":"SAML 2.0 implementation for Node.js","keywords":["saml","adfs","sso","shibboleth"],"repository":{"type":"git","url":"https://github.com/node-saml/node-saml.git"},"license":"MIT","author":{"name":"Henri Bergius","email":"henri.bergius@iki.fi","url":"http://bergie.iki.fi"},"contributors":["Michael Bosworth","Herbert Vojčík","Peter Loer","Mark Stosberg","Chris Barth","Andrii Kostenko","Andreas Zoellner"],"main":"./lib","files":["lib","README.md","LICENSE"],"scripts":{"build":"tsc","changelog":"gren changelog --override --generate --head master","lint":"eslint --ext .ts \"**/*.ts\" --cache && npm run prettier-check","lint-watch":"onchange -k -p 100 \"**/*.ts\" -- eslint {{file}}","lint:fix":"eslint --ext .ts --fix src && npm run prettier-format","prepare":"tsc","prettier-check":"prettier --config .prettierrc.json --check .","prettier-format":"prettier --config .prettierrc.json --write .","prettier-watch":"onchange -k -p 100 \".\" -- prettier --config .prettierrc.json --write {{file}}","prerelease":"git clean -xfd && npm ci && npm test && npm run build","release":"release-it","test":"npm run prettier-check && npm run lint && npm run tsc && nyc mocha","test-watch":"mocha --watch","tsc":"tsc","tsc-watch":"tsc --watch","watch":"concurrently --kill-others \"npm:*-watch\""},"dependencies":{"@types/debug":"^4.1.7","@types/passport":"^1.0.11","@types/xml-crypto":"^1.4.2","@types/xml-encryption":"^1.2.1","@types/xml2js":"^0.4.11","@xmldom/xmldom":"^0.8.6","debug":"^4.3.4","xml-crypto":"^3.0.1","xml-encryption":"^3.0.2","xml2js":"^0.5.0","xmlbuilder":"^15.1.1"},"devDependencies":{"@cjbarth/github-release-notes":"^3.0.0","@istanbuljs/nyc-config-typescript":"^1.0.2","@types/chai":"^4.3.3","@types/mocha":"^10.0.0","@types/node":"^14.18.33","@types/sinon":"^10.0.13","@typescript-eslint/eslint-plugin":"^5.45.0","@typescript-eslint/parser":"^5.43.0","body-parser":"^1.20.1","chai":"^4.3.6","choma":"^1.2.1","concurrently":"^7.6.0","eslint":"^8.29.0","eslint-config-prettier":"^8.5.0","eslint-plugin-deprecation":"^1.3.3","eslint-plugin-prettier":"^4.2.1","express":"^4.18.2","mocha":"^10.1.0","nyc":"^15.1.0","onchange":"^7.1.0","prettier":"^2.8.0","prettier-plugin-packagejson":"^2.3.0","release-it":"^15.5.0","sinon":"^14.0.1","ts-node":"^10.9.1","typescript":">=4.0.0 <4.9.0"},"engines":{"node":">= 14"},"publishConfig":{"access":"public"},"_lastModified":"2025-11-20T08:12:31.812Z"}
1
+ {"name":"@node-saml/node-saml","version":"4.0.5","description":"SAML 2.0 implementation for Node.js","keywords":["saml","adfs","sso","shibboleth"],"repository":{"type":"git","url":"https://github.com/node-saml/node-saml.git"},"license":"MIT","author":{"name":"Henri Bergius","email":"henri.bergius@iki.fi","url":"http://bergie.iki.fi"},"contributors":["Michael Bosworth","Herbert Vojčík","Peter Loer","Mark Stosberg","Chris Barth","Andrii Kostenko","Andreas Zoellner"],"main":"./lib","files":["lib","README.md","LICENSE"],"scripts":{"build":"tsc","changelog":"gren changelog --override --generate --head master","lint":"eslint --ext .ts \"**/*.ts\" --cache && npm run prettier-check","lint-watch":"onchange -k -p 100 \"**/*.ts\" -- eslint {{file}}","lint:fix":"eslint --ext .ts --fix src && npm run prettier-format","prepare":"tsc","prettier-check":"prettier --config .prettierrc.json --check .","prettier-format":"prettier --config .prettierrc.json --write .","prettier-watch":"onchange -k -p 100 \".\" -- prettier --config .prettierrc.json --write {{file}}","prerelease":"git clean -xfd && npm ci && npm test && npm run build","release":"release-it","test":"npm run prettier-check && npm run lint && npm run tsc && nyc mocha","test-watch":"mocha --watch","tsc":"tsc","tsc-watch":"tsc --watch","watch":"concurrently --kill-others \"npm:*-watch\""},"dependencies":{"@types/debug":"^4.1.7","@types/passport":"^1.0.11","@types/xml-crypto":"^1.4.2","@types/xml-encryption":"^1.2.1","@types/xml2js":"^0.4.11","@xmldom/xmldom":"^0.8.6","debug":"^4.3.4","xml-crypto":"^3.0.1","xml-encryption":"^3.0.2","xml2js":"^0.5.0","xmlbuilder":"^15.1.1"},"devDependencies":{"@cjbarth/github-release-notes":"^3.0.0","@istanbuljs/nyc-config-typescript":"^1.0.2","@types/chai":"^4.3.3","@types/mocha":"^10.0.0","@types/node":"^14.18.33","@types/sinon":"^10.0.13","@typescript-eslint/eslint-plugin":"^5.45.0","@typescript-eslint/parser":"^5.43.0","body-parser":"^1.20.1","chai":"^4.3.6","choma":"^1.2.1","concurrently":"^7.6.0","eslint":"^8.29.0","eslint-config-prettier":"^8.5.0","eslint-plugin-deprecation":"^1.3.3","eslint-plugin-prettier":"^4.2.1","express":"^4.18.2","mocha":"^10.1.0","nyc":"^15.1.0","onchange":"^7.1.0","prettier":"^2.8.0","prettier-plugin-packagejson":"^2.3.0","release-it":"^15.5.0","sinon":"^14.0.1","ts-node":"^10.9.1","typescript":">=4.0.0 <4.9.0"},"engines":{"node":">= 14"},"publishConfig":{"access":"public"},"_lastModified":"2025-12-05T07:13:42.879Z"}
@@ -31,7 +31,7 @@ const redirect = async (ctx, next) => {
31
31
  prefix += `/apps/${appName}`;
32
32
  }
33
33
  }
34
- const auth = await ctx.app.authManager.get(authenticator, ctx);
34
+ const auth = await ctx.tego.authManager.get(authenticator, ctx);
35
35
  if (prefix.endsWith("/")) {
36
36
  prefix = prefix.slice(0, -1);
37
37
  }
@@ -44,7 +44,7 @@ class SAMLPlugin extends import_server.Plugin {
44
44
  this.app.authManager.registerTypes(import_constants.authType, {
45
45
  auth: import_saml_auth.SAMLAuth
46
46
  });
47
- this.app.resource({
47
+ this.app.resourcer.define({
48
48
  name: "saml",
49
49
  actions: {
50
50
  redirect: import_redirect.redirect,
@@ -1,5 +1,5 @@
1
- import { SamlConfig } from '@node-saml/node-saml';
2
1
  import { AuthConfig, BaseAuth } from '@tego/server';
2
+ import { SamlConfig } from '@node-saml/node-saml';
3
3
  export { Model } from '@tego/server';
4
4
  export declare class SAMLAuth extends BaseAuth {
5
5
  constructor(config: AuthConfig);
@@ -21,8 +21,8 @@ __export(saml_auth_exports, {
21
21
  SAMLAuth: () => SAMLAuth
22
22
  });
23
23
  module.exports = __toCommonJS(saml_auth_exports);
24
- var import_node_saml = require("@node-saml/node-saml");
25
24
  var import_server = require("@tego/server");
25
+ var import_node_saml = require("@node-saml/node-saml");
26
26
  var import_server2 = require("@tego/server");
27
27
  class SAMLAuth extends import_server.BaseAuth {
28
28
  constructor(config) {
@@ -39,7 +39,7 @@ class SAMLAuth extends import_server.BaseAuth {
39
39
  const name = this.authenticator.get("name");
40
40
  const protocol = http ? "http" : "https";
41
41
  return {
42
- callbackUrl: `${protocol}://${ctx.host}${process.env.API_BASE_PATH}saml:redirect?authenticator=${name}&__appName=${ctx.app.name}`,
42
+ callbackUrl: `${protocol}://${ctx.host}${process.env.API_BASE_PATH}saml:redirect?authenticator=${name}&__appName=${ctx.tego.name}`,
43
43
  entryPoint: ssoUrl,
44
44
  issuer: name,
45
45
  cert: certificate,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tachybase/plugin-auth-saml",
3
3
  "displayName": "Auth: SAML 2.0",
4
- "version": "1.6.0",
4
+ "version": "1.6.1",
5
5
  "description": "SAML 2.0 authentication.",
6
6
  "keywords": [
7
7
  "Authentication"
@@ -10,18 +10,18 @@
10
10
  "main": "./dist/server/index.js",
11
11
  "dependencies": {},
12
12
  "devDependencies": {
13
- "@ant-design/icons": "^5.6.1",
13
+ "@ant-design/icons": "^6.1.0",
14
14
  "@node-saml/node-saml": "^4.0.5",
15
- "@tachybase/schema": "1.3.52",
16
- "@tachybase/test": "1.3.52",
17
- "@tego/client": "1.3.52",
18
- "@tego/server": "1.3.52",
15
+ "@tachybase/schema": "1.6.0-alpha.9",
16
+ "@tachybase/test": "1.6.0-alpha.9",
17
+ "@tego/client": "1.6.0-alpha.9",
18
+ "@tego/server": "1.6.0-alpha.9",
19
19
  "antd": "5.22.5",
20
20
  "react": "18.3.1",
21
21
  "react-i18next": "16.2.1",
22
22
  "react-router-dom": "6.28.1",
23
- "@tachybase/client": "1.6.0",
24
- "@tachybase/module-auth": "1.6.0"
23
+ "@tachybase/module-auth": "1.6.1",
24
+ "@tachybase/client": "1.6.1"
25
25
  },
26
26
  "description.zh-CN": "通过 SAML 2.0 协议认证身份。",
27
27
  "displayName.zh-CN": "认证:SAML 2.0",