@tachybase/plugin-auth-saml 1.3.21 → 1.3.23
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/client/index.js +2 -2
- package/dist/externalVersion.js +7 -9
- package/dist/node_modules/@node-saml/node-saml/package.json +1 -1
- package/dist/server/actions/getAuthUrl.d.ts +1 -1
- package/dist/server/actions/metadata.d.ts +1 -1
- package/dist/server/actions/redirect.d.ts +1 -1
- package/dist/server/actions/redirect.js +1 -1
- package/dist/server/migrations/20231008112900-update-autosignup.d.ts +1 -1
- package/dist/server/migrations/20231008112900-update-autosignup.js +1 -1
- package/dist/server/plugin.d.ts +1 -1
- package/dist/server/plugin.js +3 -3
- package/dist/server/saml-auth.d.ts +3 -3
- package/dist/server/saml-auth.js +4 -4
- package/package.json +11 -18
package/dist/client/index.js
CHANGED
|
@@ -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("@
|
|
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("@ant-design/icons"),require("@tego/client"),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","@ant-design/icons","@tego/client","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["@ant-design/icons"],e["@tego/client"],e.antd,e["react-i18next"],e["react-router-dom"]))})(this,function(e,t,i,r,p,f,l,m,o,h,v){"use strict";var I=(e,t,i)=>new Promise((r,p)=>{var f=o=>{try{m(i.next(o))}catch(h){p(h)}},l=o=>{try{m(i.throw(o))}catch(h){p(h)}},m=o=>o.done?r(o.value):Promise.resolve(o.value).then(f,l);m((i=i.apply(e,t)).next())});const F="SAML",C="saml";function q(a){return t.i18n.t(a,{ns:C})}function S(){return h.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"}}},L=f.observer(()=>{var c;const a=f.useForm(),x=t.useRecord(),{t:u}=S(),y=t.useApp(),s=(c=a.values.name)!=null?c:x.name,g=p.useMemo(()=>{var P;const n=y.getOptions(),d=(P=n==null?void 0:n.apiClient)==null?void 0:P.baseURL,{protocol:B,host:N}=window.location,A=m.getSubAppName(y.getPublicPath())||"main";return d.startsWith("http")?`${d}saml:redirect?authenticator=${s}&__appName=${A}`:`${B}//${N}${d}saml:redirect?authenticator=${s}&__appName=${A}`},[y,s]),b=n=>{navigator.clipboard.writeText(n),o.message.success(u("Copied"))};return r.jsxs(o.Card,{title:u("Usage"),type:"inner",children:[r.jsx(t.FormItem,{label:u("SP Issuer/EntityID"),children:r.jsx(t.Input,{value:s,disabled:!0,addonBefore:r.jsx(l.CopyOutlined,{onClick:()=>b(s)})})}),r.jsx(t.FormItem,{label:u("ACS URL"),children:r.jsx(t.Input,{value:g,disabled:!0,addonBefore:r.jsx(l.CopyOutlined,{onClick:()=>b(g)})})})]})},{displayName:"Usage"}),T=()=>{const{t:a}=S();return r.jsx(t.SchemaComponent,{scope:{t:a},components:{Usage:L},schema:j})},w=({authenticator:a})=>{const{t:x}=S(),u=t.useAPIClient(),y=v.useLocation(),s=new URLSearchParams(y.search),g=s.get("redirect"),b=()=>I(null,null,function*(){var d;const c=yield u.request({method:"post",url:"saml:getAuthUrl",headers:{"X-Authenticator":a.name},data:{redirect:g}}),n=(d=c==null?void 0:c.data)==null?void 0:d.data;window.location.replace(n)});return p.useEffect(()=>{const c=s.get("authenticator"),n=s.get("error");if(c===a.name&&n){o.message.error(n);return}}),r.jsx(o.Space,{direction:"vertical",className:t.css`
|
|
2
2
|
display: flex;
|
|
3
|
-
`,children:r.jsx(
|
|
3
|
+
`,children:r.jsx(o.Button,{shape:"round",block:!0,icon:r.jsx(l.LoginOutlined,{}),onClick:b,children:x(a.title)})})};class U extends t.Plugin{load(){return I(this,null,function*(){this.app.pm.get(i).registerType(F,{components:{SignInButton:w,AdminSettingsForm:T}})})}}e.SamlPlugin=U,e.default=U,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/externalVersion.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
"react": "18.3.1",
|
|
3
|
-
"@tachybase/client": "1.3.
|
|
4
|
-
"@tachybase/schema": "1.3.
|
|
5
|
-
"@
|
|
6
|
-
"@
|
|
3
|
+
"@tachybase/client": "1.3.23",
|
|
4
|
+
"@tachybase/schema": "1.3.43",
|
|
5
|
+
"@ant-design/icons": "5.6.1",
|
|
6
|
+
"@tego/client": "1.3.43",
|
|
7
7
|
"antd": "5.22.5",
|
|
8
|
-
"@tachybase/module-auth": "1.3.
|
|
8
|
+
"@tachybase/module-auth": "1.3.23",
|
|
9
9
|
"react-router-dom": "6.28.1",
|
|
10
|
-
"@
|
|
11
|
-
"
|
|
12
|
-
"react-i18next": "15.2.0",
|
|
13
|
-
"@tachybase/actions": "1.3.21"
|
|
10
|
+
"@tego/server": "1.3.43",
|
|
11
|
+
"react-i18next": "15.2.0"
|
|
14
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-
|
|
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-08-02T21:27:17.116Z"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Context, Next } from '@
|
|
1
|
+
import { Context, Next } from '@tego/server';
|
|
2
2
|
export declare const getAuthUrl: (ctx: Context, next: Next) => Promise<any>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Context, Next } from '@
|
|
1
|
+
import { Context, Next } from '@tego/server';
|
|
2
2
|
export declare const metadata: (ctx: Context, next: Next) => Promise<any>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Context, Next } from '@
|
|
1
|
+
import { Context, Next } from '@tego/server';
|
|
2
2
|
export declare const redirect: (ctx: Context, next: Next) => Promise<void>;
|
|
@@ -20,7 +20,7 @@ __export(redirect_exports, {
|
|
|
20
20
|
redirect: () => redirect
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(redirect_exports);
|
|
23
|
-
var import_server = require("@
|
|
23
|
+
var import_server = require("@tego/server");
|
|
24
24
|
const redirect = async (ctx, next) => {
|
|
25
25
|
const { authenticator, __appName: appName } = ctx.action.params || {};
|
|
26
26
|
const { RelayState: redirect2 } = ctx.action.params.values || {};
|
|
@@ -20,7 +20,7 @@ __export(update_autosignup_exports, {
|
|
|
20
20
|
default: () => UpdateAutoSignupMigration
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(update_autosignup_exports);
|
|
23
|
-
var import_server = require("@
|
|
23
|
+
var import_server = require("@tego/server");
|
|
24
24
|
var import_constants = require("../../constants");
|
|
25
25
|
class UpdateAutoSignupMigration extends import_server.Migration {
|
|
26
26
|
constructor() {
|
package/dist/server/plugin.d.ts
CHANGED
package/dist/server/plugin.js
CHANGED
|
@@ -21,8 +21,8 @@ __export(plugin_exports, {
|
|
|
21
21
|
default: () => plugin_default
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(plugin_exports);
|
|
24
|
-
var
|
|
25
|
-
var import_server = require("@
|
|
24
|
+
var import_node_path = require("node:path");
|
|
25
|
+
var import_server = require("@tego/server");
|
|
26
26
|
var import_constants = require("../constants");
|
|
27
27
|
var import_getAuthUrl = require("./actions/getAuthUrl");
|
|
28
28
|
var import_metadata = require("./actions/metadata");
|
|
@@ -36,7 +36,7 @@ class SAMLPlugin extends import_server.Plugin {
|
|
|
36
36
|
async load() {
|
|
37
37
|
this.db.addMigrations({
|
|
38
38
|
namespace: "auth",
|
|
39
|
-
directory: (0,
|
|
39
|
+
directory: (0, import_node_path.resolve)(__dirname, "migrations"),
|
|
40
40
|
context: {
|
|
41
41
|
plugin: this
|
|
42
42
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AuthConfig, BaseAuth } from '@tachybase/auth';
|
|
2
1
|
import { SamlConfig } from '@node-saml/node-saml';
|
|
3
|
-
|
|
2
|
+
import { AuthConfig, BaseAuth } from '@tego/server';
|
|
3
|
+
export { Model } from '@tego/server';
|
|
4
4
|
export declare class SAMLAuth extends BaseAuth {
|
|
5
5
|
constructor(config: AuthConfig);
|
|
6
6
|
getOptions(): SamlConfig;
|
|
7
|
-
validate(): Promise<import("@
|
|
7
|
+
validate(): Promise<import("@tego/server").Model<any, any>>;
|
|
8
8
|
}
|
package/dist/server/saml-auth.js
CHANGED
|
@@ -17,14 +17,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
var saml_auth_exports = {};
|
|
19
19
|
__export(saml_auth_exports, {
|
|
20
|
-
Model: () =>
|
|
20
|
+
Model: () => import_server2.Model,
|
|
21
21
|
SAMLAuth: () => SAMLAuth
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(saml_auth_exports);
|
|
24
|
-
var import_auth = require("@tachybase/auth");
|
|
25
24
|
var import_node_saml = require("@node-saml/node-saml");
|
|
26
|
-
var
|
|
27
|
-
|
|
25
|
+
var import_server = require("@tego/server");
|
|
26
|
+
var import_server2 = require("@tego/server");
|
|
27
|
+
class SAMLAuth extends import_server.BaseAuth {
|
|
28
28
|
constructor(config) {
|
|
29
29
|
const { ctx } = config;
|
|
30
30
|
super({
|
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.
|
|
4
|
+
"version": "1.3.23",
|
|
5
5
|
"description": "SAML 2.0 authentication.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"Authentication"
|
|
@@ -10,27 +10,20 @@
|
|
|
10
10
|
"main": "./dist/server/index.js",
|
|
11
11
|
"dependencies": {},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@ant-design/icons": "
|
|
13
|
+
"@ant-design/icons": "^5.6.1",
|
|
14
14
|
"@node-saml/node-saml": "^4.0.5",
|
|
15
|
+
"@tachybase/schema": "^1.3.43",
|
|
16
|
+
"@tachybase/test": "^1.3.43",
|
|
17
|
+
"@tego/client": "^1.3.43",
|
|
18
|
+
"@tego/server": "^1.3.43",
|
|
15
19
|
"antd": "5.22.5",
|
|
16
|
-
"react": "
|
|
17
|
-
"react-i18next": "
|
|
20
|
+
"react": "18.3.1",
|
|
21
|
+
"react-i18next": "15.2.0",
|
|
18
22
|
"react-router-dom": "6.28.1",
|
|
19
|
-
"@tachybase/
|
|
20
|
-
|
|
21
|
-
"peerDependencies": {
|
|
22
|
-
"@tachybase/actions": "1.3.21",
|
|
23
|
-
"@tachybase/auth": "1.3.21",
|
|
24
|
-
"@tachybase/module-auth": "1.3.21",
|
|
25
|
-
"@tachybase/client": "1.3.21",
|
|
26
|
-
"@tachybase/sdk": "1.3.21",
|
|
27
|
-
"@tachybase/server": "1.3.21",
|
|
28
|
-
"@tachybase/database": "1.3.21",
|
|
29
|
-
"@tachybase/test": "1.3.21"
|
|
23
|
+
"@tachybase/client": "1.3.23",
|
|
24
|
+
"@tachybase/module-auth": "1.3.23"
|
|
30
25
|
},
|
|
31
26
|
"description.zh-CN": "通过 SAML 2.0 协议认证身份。",
|
|
32
27
|
"displayName.zh-CN": "认证:SAML 2.0",
|
|
33
|
-
"scripts": {
|
|
34
|
-
"build": "tachybase-build --no-dts @tachybase/plugin-auth-saml"
|
|
35
|
-
}
|
|
28
|
+
"scripts": {}
|
|
36
29
|
}
|