@tachybase/plugin-auth-saml 1.3.15 → 1.3.17

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,3 +1,3 @@
1
- (function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("@tachybase/client"),require("@tachybase/module-auth/client"),require("react/jsx-runtime"),require("react"),require("@tachybase/schema"),require("@tachybase/sdk"),require("@ant-design/icons"),require("antd"),require("react-i18next"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","@tachybase/client","@tachybase/module-auth/client","react/jsx-runtime","react","@tachybase/schema","@tachybase/sdk","@ant-design/icons","antd","react-i18next","react-router-dom"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["@tachybase/plugin-auth-saml"]={},e["@tachybase/client"],e["@tachybase/module-auth"],e.jsxRuntime,e.react,e["@tachybase/schema"],e["@tachybase/sdk"],e["@ant-design/icons"],e.antd,e["react-i18next"],e["react-router-dom"]))})(this,function(e,t,u,r,l,y,g,i,a,m,v){"use strict";var I=(e,t,u)=>new Promise((r,l)=>{var y=a=>{try{i(u.next(a))}catch(m){l(m)}},g=a=>{try{i(u.throw(a))}catch(m){l(m)}},i=a=>a.done?r(a.value):Promise.resolve(a.value).then(y,g);i((u=u.apply(e,t)).next())});const F="SAML",C="saml";function q(o){return t.i18n.t(o,{ns:C})}function S(){return m.useTranslation(C)}const j={type:"object",properties:{saml:{type:"object",properties:{ssoUrl:{title:'{{t("SSO URL")}}',"x-component":"Input","x-decorator":"FormItem",required:!0},certificate:{title:'{{t("Public Certificate")}}',"x-component":"Input.TextArea","x-decorator":"FormItem",required:!0},idpIssuer:{title:"idP Issuer","x-component":"Input","x-decorator":"FormItem"},http:{title:'{{t("http")}}',"x-component":"Checkbox","x-decorator":"FormItem"},userBindField:{type:"string",title:'{{t("Use this field to bind the user")}}',"x-component":"Select","x-decorator":"FormItem",default:"email",enum:[{label:q("Email"),value:"email"},{label:q("Username"),value:"username"}],required:!0}}},public:{type:"object",properties:{autoSignup:{"x-decorator":"FormItem",type:"boolean",title:'{{t("Sign up automatically when the user does not exist")}}',"x-component":"Checkbox",default:!0}}},usage:{type:"void","x-component":"Usage"}}},k=y.observer(()=>{var c;const o=y.useForm(),f=t.useRecord(),{t:d}=S(),h=t.useApp(),s=(c=o.values.name)!=null?c:f.name,x=l.useMemo(()=>{var P;const n=h.getOptions(),p=(P=n==null?void 0:n.apiClient)==null?void 0:P.baseURL,{protocol:w,host:B}=window.location,A=g.getSubAppName(h.getPublicPath())||"main";return p.startsWith("http")?`${p}saml:redirect?authenticator=${s}&__appName=${A}`:`${w}//${B}${p}saml:redirect?authenticator=${s}&__appName=${A}`},[h,s]),b=n=>{navigator.clipboard.writeText(n),a.message.success(d("Copied"))};return r.jsxs(a.Card,{title:d("Usage"),type:"inner",children:[r.jsx(t.FormItem,{label:d("SP Issuer/EntityID"),children:r.jsx(t.Input,{value:s,disabled:!0,addonBefore:r.jsx(i.CopyOutlined,{onClick:()=>b(s)})})}),r.jsx(t.FormItem,{label:d("ACS URL"),children:r.jsx(t.Input,{value:x,disabled:!0,addonBefore:r.jsx(i.CopyOutlined,{onClick:()=>b(x)})})})]})},{displayName:"Usage"}),L=()=>{const{t:o}=S();return r.jsx(t.SchemaComponent,{scope:{t:o},components:{Usage:k},schema:j})},T=({authenticator:o})=>{const{t:f}=S(),d=t.useAPIClient(),h=v.useLocation(),s=new URLSearchParams(h.search),x=s.get("redirect"),b=()=>I(this,null,function*(){var p;const c=yield d.request({method:"post",url:"saml:getAuthUrl",headers:{"X-Authenticator":o.name},data:{redirect:x}}),n=(p=c==null?void 0:c.data)==null?void 0:p.data;window.location.replace(n)});return l.useEffect(()=>{const c=s.get("authenticator"),n=s.get("error");if(c===o.name&&n){a.message.error(n);return}}),r.jsx(a.Space,{direction:"vertical",className:t.css`
1
+ (function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("@tachybase/client"),require("@tachybase/module-auth/client"),require("react/jsx-runtime"),require("react"),require("@tachybase/schema"),require("@tachybase/sdk"),require("@ant-design/icons"),require("antd"),require("react-i18next"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","@tachybase/client","@tachybase/module-auth/client","react/jsx-runtime","react","@tachybase/schema","@tachybase/sdk","@ant-design/icons","antd","react-i18next","react-router-dom"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["@tachybase/plugin-auth-saml"]={},e["@tachybase/client"],e["@tachybase/module-auth"],e.jsxRuntime,e.react,e["@tachybase/schema"],e["@tachybase/sdk"],e["@ant-design/icons"],e.antd,e["react-i18next"],e["react-router-dom"]))})(this,function(e,t,u,r,l,y,g,i,a,m,v){"use strict";var I=(e,t,u)=>new Promise((r,l)=>{var y=a=>{try{i(u.next(a))}catch(m){l(m)}},g=a=>{try{i(u.throw(a))}catch(m){l(m)}},i=a=>a.done?r(a.value):Promise.resolve(a.value).then(y,g);i((u=u.apply(e,t)).next())});const F="SAML",C="saml";function q(o){return t.i18n.t(o,{ns:C})}function S(){return m.useTranslation(C)}const j={type:"object",properties:{saml:{type:"object",properties:{ssoUrl:{title:'{{t("SSO URL")}}',"x-component":"Input","x-decorator":"FormItem",required:!0},certificate:{title:'{{t("Public Certificate")}}',"x-component":"Input.TextArea","x-decorator":"FormItem",required:!0},idpIssuer:{title:"idP Issuer","x-component":"Input","x-decorator":"FormItem"},http:{title:'{{t("http")}}',"x-component":"Checkbox","x-decorator":"FormItem"},userBindField:{type:"string",title:'{{t("Use this field to bind the user")}}',"x-component":"Select","x-decorator":"FormItem",default:"email",enum:[{label:q("Email"),value:"email"},{label:q("Username"),value:"username"}],required:!0}}},public:{type:"object",properties:{autoSignup:{"x-decorator":"FormItem",type:"boolean",title:'{{t("Sign up automatically when the user does not exist")}}',"x-component":"Checkbox",default:!0}}},usage:{type:"void","x-component":"Usage"}}},k=y.observer(()=>{var c;const o=y.useForm(),f=t.useRecord(),{t:d}=S(),h=t.useApp(),s=(c=o.values.name)!=null?c:f.name,x=l.useMemo(()=>{var P;const n=h.getOptions(),p=(P=n==null?void 0:n.apiClient)==null?void 0:P.baseURL,{protocol:w,host:B}=window.location,A=g.getSubAppName(h.getPublicPath())||"main";return p.startsWith("http")?`${p}saml:redirect?authenticator=${s}&__appName=${A}`:`${w}//${B}${p}saml:redirect?authenticator=${s}&__appName=${A}`},[h,s]),b=n=>{navigator.clipboard.writeText(n),a.message.success(d("Copied"))};return r.jsxs(a.Card,{title:d("Usage"),type:"inner",children:[r.jsx(t.FormItem,{label:d("SP Issuer/EntityID"),children:r.jsx(t.Input,{value:s,disabled:!0,addonBefore:r.jsx(i.CopyOutlined,{onClick:()=>b(s)})})}),r.jsx(t.FormItem,{label:d("ACS URL"),children:r.jsx(t.Input,{value:x,disabled:!0,addonBefore:r.jsx(i.CopyOutlined,{onClick:()=>b(x)})})})]})},{displayName:"Usage"}),L=()=>{const{t:o}=S();return r.jsx(t.SchemaComponent,{scope:{t:o},components:{Usage:k},schema:j})},T=({authenticator:o})=>{const{t:f}=S(),d=t.useAPIClient(),h=v.useLocation(),s=new URLSearchParams(h.search),x=s.get("redirect"),b=()=>I(null,null,function*(){var p;const c=yield d.request({method:"post",url:"saml:getAuthUrl",headers:{"X-Authenticator":o.name},data:{redirect:x}}),n=(p=c==null?void 0:c.data)==null?void 0:p.data;window.location.replace(n)});return l.useEffect(()=>{const c=s.get("authenticator"),n=s.get("error");if(c===o.name&&n){a.message.error(n);return}}),r.jsx(a.Space,{direction:"vertical",className:t.css`
2
2
  display: flex;
3
3
  `,children:r.jsx(a.Button,{shape:"round",block:!0,icon:r.jsx(i.LoginOutlined,{}),onClick:b,children:f(o.title)})})};class U extends t.Plugin{load(){return I(this,null,function*(){this.app.pm.get(u).registerType(F,{components:{SignInButton:T,AdminSettingsForm:L}})})}}e.SamlPlugin=U,e.default=U,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -1,14 +1,14 @@
1
1
  module.exports = {
2
2
  "react": "18.3.1",
3
- "@tachybase/client": "1.3.15",
4
- "@tachybase/schema": "1.3.15",
5
- "@tachybase/sdk": "1.3.15",
3
+ "@tachybase/client": "1.3.17",
4
+ "@tachybase/schema": "1.3.17",
5
+ "@tachybase/sdk": "1.3.17",
6
6
  "@ant-design/icons": "5.3.7",
7
7
  "antd": "5.22.5",
8
- "@tachybase/module-auth": "1.3.15",
8
+ "@tachybase/module-auth": "1.3.17",
9
9
  "react-router-dom": "6.28.1",
10
- "@tachybase/server": "1.3.15",
11
- "@tachybase/auth": "1.3.15",
10
+ "@tachybase/server": "1.3.17",
11
+ "@tachybase/auth": "1.3.17",
12
12
  "react-i18next": "15.2.0",
13
- "@tachybase/actions": "1.3.15"
13
+ "@tachybase/actions": "1.3.17"
14
14
  };
package/dist/index.js CHANGED
@@ -26,12 +26,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var src_exports = {};
30
- __export(src_exports, {
29
+ var index_exports = {};
30
+ __export(index_exports, {
31
31
  default: () => import_server.default
32
32
  });
33
- module.exports = __toCommonJS(src_exports);
34
- __reExport(src_exports, require("./server"), module.exports);
33
+ module.exports = __toCommonJS(index_exports);
34
+ __reExport(index_exports, require("./server"), module.exports);
35
35
  var import_server = __toESM(require("./server"));
36
36
  // Annotate the CommonJS export names for ESM import in node:
37
37
  0 && (module.exports = {
@@ -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-07-01T07:58:37.897Z"}
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-07-04T04:00:21.340Z"}
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.3.15",
4
+ "version": "1.3.17",
5
5
  "description": "SAML 2.0 authentication.",
6
6
  "keywords": [
7
7
  "Authentication"
@@ -16,17 +16,17 @@
16
16
  "react": "~18.3.1",
17
17
  "react-i18next": "^15.2.0",
18
18
  "react-router-dom": "6.28.1",
19
- "@tachybase/schema": "1.3.15"
19
+ "@tachybase/schema": "1.3.17"
20
20
  },
21
21
  "peerDependencies": {
22
- "@tachybase/actions": "1.3.15",
23
- "@tachybase/client": "1.3.15",
24
- "@tachybase/database": "1.3.15",
25
- "@tachybase/module-auth": "1.3.15",
26
- "@tachybase/sdk": "1.3.15",
27
- "@tachybase/server": "1.3.15",
28
- "@tachybase/test": "1.3.15",
29
- "@tachybase/auth": "1.3.15"
22
+ "@tachybase/actions": "1.3.17",
23
+ "@tachybase/auth": "1.3.17",
24
+ "@tachybase/client": "1.3.17",
25
+ "@tachybase/database": "1.3.17",
26
+ "@tachybase/module-auth": "1.3.17",
27
+ "@tachybase/server": "1.3.17",
28
+ "@tachybase/test": "1.3.17",
29
+ "@tachybase/sdk": "1.3.17"
30
30
  },
31
31
  "description.zh-CN": "通过 SAML 2.0 协议认证身份。",
32
32
  "displayName.zh-CN": "认证:SAML 2.0",