@tachybase/plugin-auth-cas 1.3.16 → 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 +1 @@
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("antd"),require("react-i18next"),require("react"),require("@tachybase/sdk"),require("@ant-design/icons"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","@tachybase/client","@tachybase/module-auth/client","react/jsx-runtime","antd","react-i18next","react","@tachybase/sdk","@ant-design/icons","react-router-dom"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["@tachybase/plugin-auth-cas"]={},e["@tachybase/client"],e["@tachybase/module-auth"],e.jsxRuntime,e.antd,e["react-i18next"],e.react,e["@tachybase/sdk"],e["@ant-design/icons"],e["react-router-dom"]))})(this,function(e,t,a,o,r,d,p,i,n,s){"use strict";var h=(e,t,a)=>new Promise((o,r)=>{var d=n=>{try{i(a.next(n))}catch(s){r(s)}},p=n=>{try{i(a.throw(n))}catch(s){r(s)}},i=n=>n.done?o(n.value):Promise.resolve(n.value).then(d,p);i((a=a.apply(e,t)).next())});const x="CAS",l="cas";function S(){return d.useTranslation(l)}function g(c){return`{{t('${c}', { ns: '${l}', nsMode: 'fallback' })}}`}const b=()=>{const{t:c}=S();return o.jsx(t.SchemaComponent,{scope:{t:c},components:{Space:r.Space},schema:{type:"object",properties:{autoSignup:{"x-decorator":"FormItem",type:"boolean",title:'{{t("Sign up automatically when the user does not exist")}}',"x-component":"Checkbox"},casUrl:{title:'{{t("CAS URL")}}',"x-component":"Input","x-decorator":"FormItem",required:!0},serviceDomain:{title:'{{t("Service domain")}}',"x-component":"Input","x-decorator":"FormItem","x-decorator-props":{tooltip:g("The domain is usually the address of your server, in local development, you can use the address of your local machine, such as: http://localhost:3000")},required:!0}}}})},q=c=>{const u=c.authenticator,P=s.useLocation(),m=new URLSearchParams(P.search),T=m.get("redirect"),A=t.useApp(),j=i.getSubAppName(A.getPublicPath())||"main",k=()=>h(this,null,function*(){window.location.replace(`/api/cas:login?authenticator=${u.name}&__appName=${j}&redirect=${T}`)});return p.useEffect(()=>{const v=m.get("authenticator"),f=m.get("error");if(v===u.name&&f){r.message.error(f);return}}),o.jsx(r.Space,{direction:"vertical",style:{display:"flex"},children:o.jsx(r.Button,{shape:"round",block:!0,icon:o.jsx(n.LoginOutlined,{}),onClick:k,children:u.title})})};class y extends t.Plugin{load(){return h(this,null,function*(){this.app.pm.get(a).registerType(x,{components:{SignInButton:q,AdminSettingsForm:b}})})}}e.SamlPlugin=y,e.default=y,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
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("antd"),require("react-i18next"),require("react"),require("@tachybase/sdk"),require("@ant-design/icons"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","@tachybase/client","@tachybase/module-auth/client","react/jsx-runtime","antd","react-i18next","react","@tachybase/sdk","@ant-design/icons","react-router-dom"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["@tachybase/plugin-auth-cas"]={},e["@tachybase/client"],e["@tachybase/module-auth"],e.jsxRuntime,e.antd,e["react-i18next"],e.react,e["@tachybase/sdk"],e["@ant-design/icons"],e["react-router-dom"]))})(this,function(e,t,a,o,r,d,p,i,n,s){"use strict";var h=(e,t,a)=>new Promise((o,r)=>{var d=n=>{try{i(a.next(n))}catch(s){r(s)}},p=n=>{try{i(a.throw(n))}catch(s){r(s)}},i=n=>n.done?o(n.value):Promise.resolve(n.value).then(d,p);i((a=a.apply(e,t)).next())});const x="CAS",l="cas";function S(){return d.useTranslation(l)}function g(c){return`{{t('${c}', { ns: '${l}', nsMode: 'fallback' })}}`}const b=()=>{const{t:c}=S();return o.jsx(t.SchemaComponent,{scope:{t:c},components:{Space:r.Space},schema:{type:"object",properties:{autoSignup:{"x-decorator":"FormItem",type:"boolean",title:'{{t("Sign up automatically when the user does not exist")}}',"x-component":"Checkbox"},casUrl:{title:'{{t("CAS URL")}}',"x-component":"Input","x-decorator":"FormItem",required:!0},serviceDomain:{title:'{{t("Service domain")}}',"x-component":"Input","x-decorator":"FormItem","x-decorator-props":{tooltip:g("The domain is usually the address of your server, in local development, you can use the address of your local machine, such as: http://localhost:3000")},required:!0}}}})},q=c=>{const u=c.authenticator,P=s.useLocation(),m=new URLSearchParams(P.search),T=m.get("redirect"),A=t.useApp(),j=i.getSubAppName(A.getPublicPath())||"main",k=()=>h(null,null,function*(){window.location.replace(`/api/cas:login?authenticator=${u.name}&__appName=${j}&redirect=${T}`)});return p.useEffect(()=>{const v=m.get("authenticator"),f=m.get("error");if(v===u.name&&f){r.message.error(f);return}}),o.jsx(r.Space,{direction:"vertical",style:{display:"flex"},children:o.jsx(r.Button,{shape:"round",block:!0,icon:o.jsx(n.LoginOutlined,{}),onClick:k,children:u.title})})};class y extends t.Plugin{load(){return h(this,null,function*(){this.app.pm.get(a).registerType(x,{components:{SignInButton:q,AdminSettingsForm:b}})})}}e.SamlPlugin=y,e.default=y,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -1,15 +1,15 @@
1
1
  module.exports = {
2
2
  "react": "18.3.1",
3
- "@tachybase/client": "1.3.16",
3
+ "@tachybase/client": "1.3.17",
4
4
  "antd": "5.22.5",
5
- "@tachybase/module-auth": "1.3.16",
6
- "@tachybase/sdk": "1.3.16",
5
+ "@tachybase/module-auth": "1.3.17",
6
+ "@tachybase/sdk": "1.3.17",
7
7
  "@ant-design/icons": "5.3.7",
8
8
  "react-router-dom": "6.28.1",
9
- "@tachybase/auth": "1.3.16",
10
- "@tachybase/database": "1.3.16",
9
+ "@tachybase/auth": "1.3.17",
10
+ "@tachybase/database": "1.3.17",
11
11
  "axios": "1.7.7",
12
- "@tachybase/server": "1.3.16",
12
+ "@tachybase/server": "1.3.17",
13
13
  "react-i18next": "15.2.0",
14
- "@tachybase/actions": "1.3.16"
14
+ "@tachybase/actions": "1.3.17"
15
15
  };
package/dist/index.js CHANGED
@@ -25,9 +25,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
25
25
  mod
26
26
  ));
27
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
- var src_exports = {};
29
- __export(src_exports, {
28
+ var index_exports = {};
29
+ __export(index_exports, {
30
30
  default: () => import_server.default
31
31
  });
32
- module.exports = __toCommonJS(src_exports);
32
+ module.exports = __toCommonJS(index_exports);
33
33
  var import_server = __toESM(require("./server"));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tachybase/plugin-auth-cas",
3
3
  "displayName": "Auth: CAS",
4
- "version": "1.3.16",
4
+ "version": "1.3.17",
5
5
  "description": "CAS authentication.",
6
6
  "keywords": [
7
7
  "Authentication"
@@ -17,14 +17,14 @@
17
17
  "react-router-dom": "6.28.1"
18
18
  },
19
19
  "peerDependencies": {
20
- "@tachybase/actions": "1.3.16",
21
- "@tachybase/client": "1.3.16",
22
- "@tachybase/module-auth": "1.3.16",
23
- "@tachybase/database": "1.3.16",
24
- "@tachybase/server": "1.3.16",
25
- "@tachybase/test": "1.3.16",
26
- "@tachybase/sdk": "1.3.16",
27
- "@tachybase/auth": "1.3.16"
20
+ "@tachybase/actions": "1.3.17",
21
+ "@tachybase/client": "1.3.17",
22
+ "@tachybase/auth": "1.3.17",
23
+ "@tachybase/database": "1.3.17",
24
+ "@tachybase/module-auth": "1.3.17",
25
+ "@tachybase/sdk": "1.3.17",
26
+ "@tachybase/server": "1.3.17",
27
+ "@tachybase/test": "1.3.17"
28
28
  },
29
29
  "description.zh-CN": "通过 CAS 协议认证身份。",
30
30
  "displayName.zh-CN": "认证:CAS",