@authing/guard-shim-react 6.0.0-alpha.14 → 6.0.0-alpha.16
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/guard.min.js +6 -6
- package/dist/typings/src/index.d.ts +4 -1
- package/package.json +1 -1
package/dist/guard.min.js
CHANGED
|
@@ -19552,7 +19552,7 @@ l=l.filter((function(e){return!eI(eI([],XA(p),!1),XA(S),!1).includes(e.provider)
|
|
|
19552
19552
|
l=[],s=[]);var E=d&&(!(null==c?void 0:c.ssoPageComponentDisplay.socialLoginBtns)||!l.length)&&(!(null==c?void 0:c.ssoPageComponentDisplay.idpBtns)||!s.length);return[l,s,E]}},pI=(o(34203),Se.createContext(void 0)),hI=Se.useContext,mI=function(e){var t=e.children,n=e.client,r=pI.Provider;return Se.createElement(r,{value:{client:n}},t)},gI=function(){var e=hI(pI);return null==e?void 0:e.client};
|
|
19553
19553
|
// EXTERNAL MODULE: ./node_modules/moment/locale/zh-cn.js
|
|
19554
19554
|
// CONCATENATED MODULE: ./package.json
|
|
19555
|
-
const vI=JSON.parse('{"i8":"6.0.0-alpha.
|
|
19555
|
+
const vI=JSON.parse('{"i8":"6.0.0-alpha.15"}');// CONCATENATED MODULE: ./src/_utils/getVersion.ts
|
|
19556
19556
|
function yI(){return vI.i8}// CONCATENATED MODULE: ./src/Guard/authClient.ts
|
|
19557
19557
|
var _I,bI=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},wI=Se.useEffect,MI=Se.useMemo,kI=Se.useState,LI=yI(),SI=function(e,t){var n=t.appId,r=t.tenantId;if(e.options.appId!==n)throw new Error("AuthClientProvider 与 Guard AppId 初始化不同,请检查初始化时传入的 AppId 是否正确");if(r&&e.options.tenantId!==r)throw new Error("AuthClientProvider 与 Guard TenantId 初始化不同,请检查初始化时传入的 TenantId 是否正确");return!0},CI=function(){return function(){if(!_I)throw new Error("Please initialize GuardAuthClient");return _I}()},EI=function(){return EI=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},EI.apply(this,arguments)},TI=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i},xI=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};
|
|
19558
19558
|
/**
|
|
@@ -20797,20 +20797,20 @@ e.config.loginMethods=e.config.loginMethodList),oQ(e.config.registerMethodList)&
|
|
|
20797
20797
|
// @ts-ignore
|
|
20798
20798
|
e.config.registerMethods=e.config.registerMethodList),oQ(e.config.registerMethod)&&(
|
|
20799
20799
|
// @ts-ignore
|
|
20800
|
-
e.config.defaultRegisterMethod=e.config.registerMethod),oQ(e.config.contentCSS)&&(e.config.contentCss=e.config.contentCSS),e},e.prototype.getPublicConfig=function(){return eQ(this,void 0,void 0,(function(){var e,t,n;return tQ(this,(function(r){switch(r.label){case 0:return e="".concat(this.options.host)||"https://core.authing.cn",t={method:"GET",credentials:"include"},[4/*yield*/,fetch("".concat(e,"/api/v2/applications/").concat(this.options.appId,"/public-config"),t)];case 1:return[4/*yield*/,r.sent().text()];case 2:return n=r.sent(),[2/*return*/,JSON.parse(n)]}}))}))},e.prototype.getAuthClient=function(){return eQ(this,void 0,void 0,(function(){var e,t,n;return tQ(this,(function(
|
|
20800
|
+
e.config.defaultRegisterMethod=e.config.registerMethod),oQ(e.config.contentCSS)&&(e.config.contentCss=e.config.contentCSS),e},e.prototype.getPublicConfig=function(){return eQ(this,void 0,void 0,(function(){var e,t,n;return tQ(this,(function(r){switch(r.label){case 0:return e="".concat(this.options.host)||"https://core.authing.cn",t={method:"GET",credentials:"include"},[4/*yield*/,fetch("".concat(e,"/api/v2/applications/").concat(this.options.appId,"/public-config"),t)];case 1:return[4/*yield*/,r.sent().text()];case 2:return n=r.sent(),[2/*return*/,JSON.parse(n)]}}))}))},e.prototype.getRequestHost=function(){return eQ(this,void 0,void 0,(function(){var e;return tQ(this,(function(t){switch(t.label){case 0:return this.options.host?[2/*return*/,this.options.host]:[4/*yield*/,this.then()];case 1:return(e=t.sent()).requestHostname?[2/*return*/,"https://".concat(e.requestHostname)]:[2/*return*/,"https://core.authing.cn"]}}))}))},e.prototype.getAuthClient=function(){return eQ(this,void 0,void 0,(function(){var e,t,n,r;return tQ(this,(function(o){switch(o.label){case 0:e={},o.label=1;case 1:return o.trys.push([1,3,,4]),[4/*yield*/,this.then()];case 2:return e=o.sent(),[3/*break*/,4];case 3:throw t=o.sent(),new Error(JSON.stringify(t));case 4:return[4/*yield*/,this.getRequestHost()];case 5:return n=o.sent(),r=Object.assign({},{appId:this.options.appId,appHost:n,tenantId:this.options.tenantId,redirectUri:this.options.redirectUri||e.oidcConfig.redirect_uris[0],tokenEndPointAuthMethod:e.oidcConfig.token_endpoint_auth_method||"none",introspectionEndPointAuthMethod:e.oidcConfig.introspection_endpoint_auth_method||"none"}),[2/*return*/,new Cu(r)]}}))}))},e.getGuardContainer=function(e){var t="authing_guard_container";if(!e){var n=document.querySelector("#".concat(t));return n||((n=document.createElement("div")).id=t,document.body.appendChild(n)),n}if("string"==typeof e){var r=document.querySelector(e);return r}return e},
|
|
20801
20801
|
/**
|
|
20802
20802
|
* 启动嵌入模式
|
|
20803
20803
|
* @param el String
|
|
20804
20804
|
* @returns Promise
|
|
20805
20805
|
*/
|
|
20806
|
-
e.prototype.start=function(e){return eQ(this,void 0,void 0,(function(){var t,n=this;return tQ(this,(function(r){switch(r.label){case 0:return this.options.config.target=e,this._render(),[4/*yield*/,this.trackSession()];case 1:return(t=r.sent())?[2/*return*/,Promise.resolve(t)]:[2/*return*/,new Promise((function(e){n.on("login",(function(t){e(t)}))}))]}}))}))},e.prototype.startRegister=function(){this.changeView("register")},e.prototype.checkLoginStatus=function(){return eQ(this,void 0,void 0,(function(){var e,t,n,r,o;return tQ(this,(function(
|
|
20806
|
+
e.prototype.start=function(e){return eQ(this,void 0,void 0,(function(){var t,n=this;return tQ(this,(function(r){switch(r.label){case 0:return this.options.config.target=e,this._render(),[4/*yield*/,this.trackSession()];case 1:return(t=r.sent())?[2/*return*/,Promise.resolve(t)]:[2/*return*/,new Promise((function(e){n.on("login",(function(t){e(t)}))}))]}}))}))},e.prototype.startRegister=function(){this.changeView("register")},e.prototype.checkLoginStatus=function(){return eQ(this,void 0,void 0,(function(){var e,t,n,r,o,a,i;return tQ(this,(function(s){switch(s.label){case 0:return[4/*yield*/,this.getAuthClient()];case 1:return e=s.sent(),[4/*yield*/,this.trackSession()];case 2:return(t=s.sent())?(e.tokenProvider.setUser(t),(n=localStorage.getItem("accessToken"))?[4/*yield*/,this.getRequestHost()]:[2/*return*/]):[2/*return*/];case 3:r=s.sent(),o={method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:n})},s.label=4;case 4:return s.trys.push([4,7,,8]),[4/*yield*/,fetch("".concat(r,"/api/v2/users/login/check-status"),o)];case 5:return[4/*yield*/,s.sent().text()];case 6:return a=s.sent(),200===(i=JSON.parse(a)).code&&!0===i.status?[2/*return*/,i]:[3/*break*/,8];case 7:return s.sent(),[2/*return*/];case 8:return[2/*return*/]}}))}))},e.prototype.changeLang=function(e){this.options.lang=e,this.options.config=Object.assign({},this.options.config,{lang:e}),this.unmount(),this._render()},e.prototype.changeContentCSS=function(e){this.options.config=Object.assign({},this.options.config,{contentCss:e}),this.unmount(),this._render()},
|
|
20807
20807
|
/**
|
|
20808
20808
|
* 启动跳转模式
|
|
20809
20809
|
*/
|
|
20810
|
-
e.prototype.startWithRedirect=function(e){return void 0===e&&(e={}),eQ(this,void 0,void 0,(function(){var t,n,r,o,a,i,s,l,u,c,d,f,p,h,m,g,v,y,_;return tQ(this,(function(b){switch(b.label){case 0:return t=function(){return Math.random().toString().slice(2)},n=e.codeChallengeMethod,r=void 0===n?"S256":n,o=e.scope,a=void 0===o?"openid profile email phone address":o,i=e.state,s=void 0===i?t():i,l=e.nonce,u=void 0===l?t():l,c=e.responseMode,d=void 0===c?"query":c,f=e.responseType,p=void 0===f?"code":f,[4/*yield*/,this.getAuthClient()];case 1:h=b.sent(),m=h.generateCodeChallenge(),localStorage.setItem("codeChallenge",m),g=h.getCodeChallengeDigest({codeChallenge:m,method:r}),v={},b.label=2;case 2:return b.trys.push([2,4,,5]),[4/*yield*/,this.then()];case 3:return v=b.sent(),[3/*break*/,5];case 4:throw y=b.sent(),new Error(JSON.stringify(y));case 5:return _=h.buildAuthorizeUrl({codeChallenge:g,codeChallengeMethod:r,scope:a,redirectUri:this.options.redirectUri||v.oidcConfig.redirect_uris[0],state:s,nonce:u,responseMode:d,responseType:p}),window.location.href=_,[2/*return*/]}}))}))},e.prototype.handleRedirectCallback=function(){return eQ(this,void 0,void 0,(function(){var e,t,n,r,o,a;return tQ(this,(function(i){switch(i.label){case 0:return e=this.getCodeAndCodeChallenge(),t=e.code,n=e.codeChallenge,[4/*yield*/,this.getAccessTokenByCode(t,n)];case 1:return r=i.sent(),o=r.id_token,a=r.access_token,this.
|
|
20810
|
+
e.prototype.startWithRedirect=function(e){return void 0===e&&(e={}),eQ(this,void 0,void 0,(function(){var t,n,r,o,a,i,s,l,u,c,d,f,p,h,m,g,v,y,_;return tQ(this,(function(b){switch(b.label){case 0:return t=function(){return Math.random().toString().slice(2)},n=e.codeChallengeMethod,r=void 0===n?"S256":n,o=e.scope,a=void 0===o?"openid profile email phone address":o,i=e.state,s=void 0===i?t():i,l=e.nonce,u=void 0===l?t():l,c=e.responseMode,d=void 0===c?"query":c,f=e.responseType,p=void 0===f?"code":f,[4/*yield*/,this.getAuthClient()];case 1:h=b.sent(),m=h.generateCodeChallenge(),localStorage.setItem("codeChallenge",m),g=h.getCodeChallengeDigest({codeChallenge:m,method:r}),v={},b.label=2;case 2:return b.trys.push([2,4,,5]),[4/*yield*/,this.then()];case 3:return v=b.sent(),[3/*break*/,5];case 4:throw y=b.sent(),new Error(JSON.stringify(y));case 5:return _=h.buildAuthorizeUrl({codeChallenge:g,codeChallengeMethod:r,scope:a,redirectUri:this.options.redirectUri||v.oidcConfig.redirect_uris[0],state:s,nonce:u,responseMode:d,responseType:p}),window.location.href=_,[2/*return*/]}}))}))},e.prototype.handleRedirectCallback=function(){return eQ(this,void 0,void 0,(function(){var e,t,n,r,o,a;return tQ(this,(function(i){switch(i.label){case 0:return e=this.getCodeAndCodeChallenge(),t=e.code,n=e.codeChallenge,[4/*yield*/,this.getAccessTokenByCode(t,n)];case 1:return r=i.sent(),o=r.id_token,a=r.access_token,this.setTokenCache(a,o),[2/*return*/]}}))}))},e.prototype.getAccessTokenByCode=function(e,t){return eQ(this,void 0,void 0,(function(){return tQ(this,(function(n){switch(n.label){case 0:return[4/*yield*/,this.getAuthClient()];case 1:return[4/*yield*/,n.sent().getAccessTokenByCode(e,{codeVerifier:t})];case 2:return[2/*return*/,n.sent()]}}))}))},e.prototype.getCodeAndCodeChallenge=function(){var e=this.parseUrlQuery().code;return{code:void 0===e?"":e,codeChallenge:localStorage.getItem("codeChallenge")||""}},e.prototype.setTokenCache=function(e,t){localStorage.setItem("accessToken",e),localStorage.setItem("idToken",t)},e.prototype.clearTokenCache=function(){localStorage.removeItem("accessToken"),localStorage.removeItem("idToken")},e.prototype.clearLoginCache=function(){return eQ(this,void 0,void 0,(function(){var e;return tQ(this,(function(t){switch(t.label){case 0:return[4/*yield*/,this.getAuthClient()];case 1:return e=t.sent(),localStorage.removeItem("codeChallenge"),e.tokenProvider.clearUser(),this.clearTokenCache(),[2/*return*/]}}))}))},e.prototype.parseUrlQuery=function(){var e={},t="";try{t=window.location.search.split("?")[1]}catch(e){t=window.location.hash.split("#")[1]}return t?(t.split("&").forEach((function(t){var n=nQ(t.split("="),2),r=n[0],o=n[1];e[r]=o})),e):e},
|
|
20811
20811
|
/**
|
|
20812
20812
|
* 获取当前用户信息
|
|
20813
20813
|
*/
|
|
20814
|
-
e.prototype.trackSession=function(){return eQ(this,void 0,void 0,(function(){var e,t,n,r,o,a,i,s,l;return tQ(this,(function(u){switch(u.label){case 0:return[4/*yield*/,this.getAuthClient()];case 1:return e=u.sent(),(t=e.tokenProvider.getToken())?[4/*yield*/,this.then()]:[2/*return*/,null];case 2:n=u.sent(),
|
|
20814
|
+
e.prototype.trackSession=function(){return eQ(this,void 0,void 0,(function(){var e,t,n,r,o,a,i,s,l;return tQ(this,(function(u){switch(u.label){case 0:return[4/*yield*/,this.getAuthClient()];case 1:return e=u.sent(),(t=e.tokenProvider.getToken()||localStorage.getItem("idToken"))?[4/*yield*/,this.then()]:[2/*return*/,null];case 2:return n=u.sent(),"".concat(this.options.host)||"https://core.authing.cn",[4/*yield*/,this.getRequestHost()];case 3:r=u.sent(),o={method:"GET",credentials:"include",headers:{"Content-Type":"application/json","x-authing-userpool-id":n.userPoolId,Authorization:t}},u.label=4;case 4:return u.trys.push([4,7,,8]),[4/*yield*/,fetch("".concat(r,"/api/v2/users/me"),o)];case 5:return[4/*yield*/,u.sent().text()];case 6:return a=u.sent(),i=JSON.parse(a),s=i.code,l=i.data,200===s?[2/*return*/,l]:[2/*return*/,null];case 7:return u.sent(),[2/*return*/,null];case 8:return[2/*return*/]}}))}))},e.prototype.logout=function(e){return void 0===e&&(e={}),eQ(this,void 0,void 0,(function(){var t,n,r,o,a,i,s;return tQ(this,(function(l){switch(l.label){case 0:return t="",n=e.redirectUri,r=e.quitCurrentDevice,[4/*yield*/,this.then()];case 1:o=l.sent().logoutRedirectUris,a=window.location.origin;try{t=n&&o.indexOf(n)>-1?n:o[0]||a}catch(e){t=a}return[4/*yield*/,this.getAuthClient()];case 2:i=l.sent(),l.label=3;case 3:return l.trys.push([3,8,9,11]),r?[4/*yield*/,i.logoutCurrent()]:[3/*break*/,5];case 4:return l.sent(),[3/*break*/,7];case 5:return[4/*yield*/,i.logout()];case 6:l.sent(),l.label=7;case 7:return[3/*break*/,11];case 8:return l.sent(),(s=i.tokenProvider.getToken()||localStorage.getItem("idToken"))&&(t=i.buildLogoutUrl({expert:!0,redirectUri:t,idToken:s})),[3/*break*/,11];case 9:return[4/*yield*/,this.clearLoginCache()];case 10:return l.sent(),window.location.href=t,[7/*endfinally*/];case 11:return[2/*return*/]}}))}))},e.prototype._render=function(){var t,n,r,o;return eQ(this,void 0,void 0,(function(){var a,i,s,l=this;return tQ(this,(function(u){switch(u.label){case 0:return a=Object.entries(NI).reduce((function(e,t){var n,r=nQ(t,2),o=r[0],a=r[1];return Object.assign({},e,((n={})[o]=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];
|
|
20815
20815
|
// TODO 返回最后一个执行函数的值,实际应该只让监听一次
|
|
20816
|
-
return"close"===a&&l.hide(),null===(e=l.eventListeners[a].map((function(e){return e.apply(void 0,rQ([],nQ(t),!1))})).slice(-1)[0])||void 0===e||e},n))}),{}),[4/*yield*/,this.then()];case 1:return i=u.sent(),[4/*yield*/,this.getAuthClient()];case 2:return s=u.sent(),this.options.config&&(this.options.config.host=this.options.host||"https://".concat(i.requestHostname)),c={container:e.getGuardContainer(null===(t=this.options.config)||void 0===t?void 0:t.target),element:Se.createElement(pJ,XJ({},a,{appId:this.options.appId,tenantId:this.options.tenantId,config:XJ(XJ({},this.options.config),{style:null!==(o=null!==(n=this.options.style)&&void 0!==n?n:null===(r=this.options.config)||void 0===r?void 0:r.style)&&void 0!==o?o:{}}),facePlugin:this.options.facePlugin,appendConfig:this.options.appendConfig,visible:this.visible,authClient:s}))},d=c.container,f=c.element,(p=At.findIndex((function(e){return e===d})))>-1?At.splice(p,1,d):At.push(d),Ot.render(f,d),[2/*return*/]}var c,d,f,p}))}))},e.prototype.on=function(e,t){this.eventListeners[e].push(t)},e.prototype.show=function(){this.visible=!0,this._render()},e.prototype.hide=function(){this.visible=!1,this._render()},e.prototype.unmount=function(){var t,n,r,o=e.getGuardContainer(null===(t=this.options.config)||void 0===t?void 0:t.target);o&&(n=o,(r=At.find((function(e){return e===n})))&&Ot.unmountComponentAtNode(r))},e.prototype.getCurrentView=function(){var e,t;return{currentModule:null===(e=window.$$guard.viewContext)||void 0===e?void 0:e.currentModule,currentTab:null===(t=window.$$guard.viewContext)||void 0===t?void 0:t.currentTab}},e.prototype.changeView=function(e){var t;return eQ(this,void 0,void 0,(function(){var n,r,o;return tQ(this,(function(a){switch(a.label){case 0:return n="",r="","string"==typeof e?(o=e.split(":"),n=o[0],r=o[1]):(n=e.module,r=e.tab),window.$$guard.viewContext&&window.$$guard.viewContext.changeModule?[4/*yield*/,null===(t=window.$$guard.viewContext)||void 0===t?void 0:t.changeModule(n)]:[2/*return*/];case 1:return a.sent(),r?(requestIdleCallback((function(){var e;null===(e=window.$$guard.viewContext)||void 0===e||e.changeTab(r)})),[2/*return*/]):[2/*return*/]}}))}))},e.prototype.getAgreementsContext=function(){return window.$$guard.agreementsContext},e.prototype.checkAllAgreements=function(){var e=this.getAgreementsContext();null==e||e.checkAllAgreements()},e.prototype.unCheckAllAgreements=function(){var e=this.getAgreementsContext();null==e||e.unCheckAllAgreements()},e}()})();var i=a.RyY,s=a.pq3,l=a.mJU,u=a.m4P,c=a.G52,d=a.qKv,f=a.itr,p=a.btN,h=a.ntY,m=a.ph9,g=a.vQ2,v=a.KJ5,y=a.Vu5,_=a.NAz,b=a.BDx,w=a.Waj,M=a.BUF,k=a.vYO,L=a.$qm,S=a.Pd_,C=a.tiu,E=a.w_I,T=a.fMl,x=a.LIr,D=a.YYM,Y=a.ekm,P=a.lhk,O=a.B2n,N=a.Lpu,A=a.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ZV,qr=a.H7E,Vr=a.ZU5,$r=a._Ck,Gr=a.jJk,Kr=a.YDg,Jr=a.$8$,Qr=a.wRn,Zr=a.GFd,Xr=a.S44,eo=a.lYd,to=a._vH,no=a.$qy,ro=a.W_N,oo=a.tPY,ao=a.cfU,io=a.lEM,so=a.NrF,lo=a.b1G,uo=a.PtZ,co=a.E6D,fo=a.AIM,po=a.b0D,ho=a.WJd,mo=a.uQX,go=a.ZmL,vo=a.aRt,yo=a.x94,_o=a.tbi,bo=a.hxx,wo=a.QL8,Mo=a.B9$,ko=a.vZy,Lo=a.ocf,So=a.pLj,Co=a.OVk,Eo=a.$R,To=a.j3,xo=a.hl1,Do=a.mk8,Yo=a.PqN,Po=a.ynv,Oo=a.dBC,No=a.M_L,Ao=a.cex,Io=a.z71,jo=a.wLl,Ro=a.ujl,Ho=a.z6o,Fo=a.msP,Bo=a.VUY,zo=a.EZR,Wo=a.yK6,Uo=a.Rnq,qo=a.uv0,Vo=a.GuS;export{i as AccessTokenDocument,s as AddMemberDocument,l as AddNodeDocument,u as AddNodeV2Document,c as AddPolicyAssignmentsDocument,d as AddUserToGroupDocument,f as AddWhitelistDocument,p as AllowDocument,h as ApiCode,m as AppPasswordStrengthLimit,g as ApplicationType,v as ArchivedUsersDocument,y as AssignRoleDocument,_ as AuthClientContext,b as AuthClientProvider,w as AuthenticationClient,M as AuthenticationTokenProvider,k as AuthorizeResourceDocument,L as AuthorizedResourcesDocument,S as AuthorizedTargetsDocument,C as BindEmailDocument,E as BindPhoneDocument,T as ChangeMfaDocument,x as ChangeModuleApiCodeMapping,D as CheckLoginStatusDocument,Y as CheckPasswordStrengthDocument,P as ChildrenNodesDocument,O as CodeAction,N as ConfigEmailTemplateDocument,A as CreateFunctionDocument,I as CreateGroupDocument,j as CreateOrgDocument,R as CreatePolicyDocument,H as CreateRoleDocument,F as CreateUserDocument,B as CreateUserWithCustomDataDocument,z as CreateUserpoolDocument,W as DeleteFunctionDocument,U as DeleteGroupsDocument,q as DeleteNodeDocument,V as DeleteOrgDocument,$ as DeletePoliciesDocument,G as DeletePolicyDocument,K as DeleteRoleDocument,J as DeleteRolesDocument,Q as DeleteUserDocument,Z as DeleteUserpoolDocument,X as DeleteUsersDocument,ee as DisableEmailTemplateDocument,te as DisbalePolicyAssignmentDocument,ne as EmailScene,re as EmailTemplateType,oe as EmailTemplatesDocument,ae as EnableEmailTemplateDocument,ie as EnablePolicyAssignmentDocument,se as ErrorCode,le as FindUserDocument,ue as FindUserWithCustomDataDocument,ce as FunctionDocument,de as FunctionsDocument,fe as GetUserDepartmentsDocument,pe as GetUserGroupsDocument,he as GetUserRolesDocument,me as GroupDocument,ge as GroupWithUsersDocument,ve as GroupWithUsersWithCustomDataDocument,ye as GroupsDocument,_e as Guard,be as GuardComponent,we as GuardEventsCamelToKebabMapping,Me as GuardHttp,ke as GuardMode,Le as GuardModuleType,Se as GuardPageSene,Ce as GuardPropsFilter,Ee as HIDE_SOCIALS,Te as HIDE_SOCIALS_SHOWIN_ENTERPRISE,xe as InputMethod,De as IsActionAllowedDocument,Ye as IsActionDeniedDocument,Pe as IsDomainAvaliableDocument,Oe as IsRootNodeDocument,Ne as IsUserExistsDocument,Ae as LanguageMap,Ie as ListGroupAuthorizedResourcesDocument,je as ListNodeByCodeAuthorizedResourcesDocument,Re as ListNodeByIdAuthorizedResourcesDocument,He as ListRoleAuthorizedResourcesDocument,Fe as ListUserAuthorizedResourcesDocument,Be as Logger,ze as LoginByEmailDocument,We as LoginByPhoneCodeDocument,Ue as LoginByPhonePasswordDocument,qe as LoginBySubAccountDocument,Ve as LoginByUsernameDocument,$e as LoginMethods,Ge as ManagementClient,Ke as ManagementTokenProvider,Je as MoveMembersDocument,Qe as MoveNodeDocument,Ze as MultipleTenant,Xe as NodeByCodeDocument,et as NodeByCodeWithMembersDocument,tt as NodeByIdDocument,nt as NodeByIdWithMembersDocument,rt as OIDCConnectionMode,ot as Operator,at as OrgDocument,it as OrgsDocument,st as PASSWORD_STRENGTH_TEXT_MAP,lt as PasswordSecurityLevel,ut as PasswordStrength,ct as PoliciesDocument,dt as PolicyAssignmentTargetType,ft as PolicyAssignmentsDocument,pt as PolicyDocument,ht as PolicyEffect,mt as PolicyWithAssignmentsDocument,gt as PreviewEmailDocument,vt as Protocol,yt as QiniuUptokenDocument,_t as QueryMfaDocument,bt as RefreshAccessTokenDocument,wt as RefreshTokenDocument,Mt as RefreshUserpoolSecretDocument,kt as RegisterByEmailDocument,Lt as RegisterByPhoneCodeDocument,St as RegisterByUsernameDocument,Ct as RegisterMethods,Et as RegisterSortMethods,Tt as RelayMethodEnum,xt as RemoveMemberDocument,Dt as RemovePolicyAssignmentsDocument,Yt as RemoveUdfDocument,Pt as RemoveUdvDocument,Ot as RemoveUserFromGroupDocument,Nt as RemoveWhitelistDocument,At as ResetPasswordByFirstLoginTokenDocument,It as ResetPasswordByForceResetTokenDocument,jt as ResetPasswordDocument,Rt as ResourceType,Ht as RevokeRoleDocument,Ft as RoleDocument,Bt as RoleWithUsersDocument,zt as RoleWithUsersWithCustomDataDocument,Wt as RolesDocument,Ut as RootNodeDocument,qt as SceneType,Vt as SearchNodesDocument,$t as SearchUserDocument,Gt as SearchUserWithCustomDataDocument,Kt as SendEmailDocument,Jt as SendFirstLoginVerifyEmailDocument,Qt as SetMainDepartmentDocument,Zt as SetUdfDocument,Xt as SetUdfValueBatchDocument,en as SetUdvBatchDocument,tn as SetUdvDocument,nn as SocialConnectionEvent,rn as SocialConnectionProvider,on as SortByEnum,an as SupportedAdminActionEnum,sn as SupportedUserActionEnum,ln as TemplateCodeDocument,un as UdfDataType,cn as UdfDocument,dn as UdfTargetType,fn as UdfValueBatchDocument,pn as UdvDocument,hn as UnbindEmailDocument,mn as UnbindPhoneDocument,gn as UpdateEmailDocument,vn as UpdateFunctionDocument,yn as UpdateGroupDocument,_n as UpdateNodeDocument,bn as UpdatePasswordDocument,wn as UpdatePhoneDocument,Mn as UpdatePolicyDocument,kn as UpdateRoleDocument,Ln as UpdateUserDocument,Sn as UpdateUserpoolDocument,Cn as UserBatchDocument,En as UserBatchWithCustomDataDocument,Tn as UserDocument,xn as UserStatus,Dn as UserWithCustomDataDocument,Yn as UserpoolDocument,Pn as UserpoolTypesDocument,On as UserpoolsDocument,Nn as UsersDocument,An as UsersWithCustomDataDocument,In as VALIDATE_PATTERN,jn as WhitelistDocument,Rn as WhitelistType,Hn as assembledRequestHost,Fn as copyToClipboard,Bn as corsVerification,zn as createGuardXContext,Wn as deepMerge,Un as errorCodeInterceptor,qn as faceErrorMessage,Vn as fallbackLng,$n as fieldRequiredRule,Gn as getAppendConfig,Kn as getCaptchaUrl,Jn as getClassnames,Qn as getCurrentLng,Zn as getDefaultG2Config,Xn as getDefaultGuardLocalConfig,er as getDeviceName,tr as getDocumentNode,nr as getFacePlugin,rr as getFlowHandle,or as getGuardHttp,ar as getHundreds,ir as getI18nLabel,sr as getLogger,lr as getLoginTypePipe,ur as getPageConfig,cr as getPasswordIdentify,dr as getPasswordValidate,fr as getPasswordValidateRules,pr as getPublicConfig,hr as getRequiredRules,mr as getSortLabels,gr as getSortTabs,vr as getSymbolTypeLength,yr as getUserRegisterParams,_r as getVersion,br as guardEventsFilter,wr as guardEventsHijacking,Mr as i18n,kr as initAppendConfig,Lr as initFacePlugin,Sr as initGuardHttp,Cr as initGuardI18n,Er as insertStyles,Tr as isAlipayBrowser,xr as isBaiduBrowser,Dr as isDingtalkBrowser,Yr as isDisabled,Pr as isEdgeBrowser,Or as isLarkBrowser,Nr as isMobile,Ar as isObject,Ir as isQQBrowser,jr as isQQBuiltInBrowser,Rr as isQtWebEngine,Hr as isSpecialBrowser,Fr as isWeChatBrowser,Br as isWeComeBrowser,zr as isWeWorkBuiltInBrowser,Wr as isWeiboBrowser,Ur as isXiaomiBrowser,qr as isoInfo,Vr as mailDesensitization,$r as parsePhone,Gr as phoneDesensitization,Kr as popupCenter,Jr as regexFromString,Qr as removeStyles,Zr as setPageConfig,Xr as setPublicConfig,eo as shoudGoToComplete,to as sleep,no as transformMethod,ro as transformSortMethod,oo as updateFlowHandle,ao as useAppId,io as useAppendConfig,so as useDebounce,lo as useFacePlugin,uo as useFetchConsoleConfig,co as useFlowHandle,fo as useGlobalAuthClient,po as useGuardAppId,ho as useGuardButtonContext,mo as useGuardButtonState,go as useGuardContextLoaded,vo as useGuardCurrentModule,yo as useGuardDefaultLanguage,_o as useGuardDefaultMergedConfig,bo as useGuardEvents,wo as useGuardFinallyConfig,Mo as useGuardHttp,ko as useGuardHttpClient,Lo as useGuardInitData,So as useGuardIsAuthFlow,Co as useGuardModule,Eo as useGuardMultipleInstance,To as useGuardPageConfig,xo as useGuardPhoneRegex,Do as useGuardPublicConfig,Yo as useGuardTenantId,Po as useGuardTenantProvider,Oo as useGuardView,No as useGuardXContext,Ao as useInitAppId,Io as useIsForeignUserpool,jo as useLogger,Ro as useMediaSize,Ho as useMergeDefaultConfig,Fo as useMethod,Bo as useMultipleTenant,zo as usePasswordErrorText,Wo as useRobotVerify,Uo as useShaking,qo as useUpdateFlowHandle,Vo as validate};
|
|
20816
|
+
return"close"===a&&l.hide(),null===(e=l.eventListeners[a].map((function(e){return e.apply(void 0,rQ([],nQ(t),!1))})).slice(-1)[0])||void 0===e||e},n))}),{}),[4/*yield*/,this.getAuthClient()];case 1:return i=u.sent(),this.options.config?[4/*yield*/,this.getRequestHost()]:[3/*break*/,3];case 2:s=u.sent(),this.options.config.host=s,u.label=3;case 3:return c={container:e.getGuardContainer(null===(t=this.options.config)||void 0===t?void 0:t.target),element:Se.createElement(pJ,XJ({},a,{appId:this.options.appId,tenantId:this.options.tenantId,config:XJ(XJ({},this.options.config),{style:null!==(o=null!==(n=this.options.style)&&void 0!==n?n:null===(r=this.options.config)||void 0===r?void 0:r.style)&&void 0!==o?o:{}}),facePlugin:this.options.facePlugin,appendConfig:this.options.appendConfig,visible:this.visible,authClient:i}))},d=c.container,f=c.element,(p=At.findIndex((function(e){return e===d})))>-1?At.splice(p,1,d):At.push(d),Ot.render(f,d),[2/*return*/]}var c,d,f,p}))}))},e.prototype.on=function(e,t){this.eventListeners[e].push(t)},e.prototype.show=function(){this.visible=!0,this._render()},e.prototype.hide=function(){this.visible=!1,this._render()},e.prototype.unmount=function(){var t,n,r,o=e.getGuardContainer(null===(t=this.options.config)||void 0===t?void 0:t.target);o&&(n=o,(r=At.find((function(e){return e===n})))&&Ot.unmountComponentAtNode(r))},e.prototype.getCurrentView=function(){var e,t;return{currentModule:null===(e=window.$$guard.viewContext)||void 0===e?void 0:e.currentModule,currentTab:null===(t=window.$$guard.viewContext)||void 0===t?void 0:t.currentTab}},e.prototype.changeView=function(e){var t;return eQ(this,void 0,void 0,(function(){var n,r,o;return tQ(this,(function(a){switch(a.label){case 0:return n="",r="","string"==typeof e?(o=e.split(":"),n=o[0],r=o[1]):(n=e.module,r=e.tab),window.$$guard.viewContext&&window.$$guard.viewContext.changeModule?[4/*yield*/,null===(t=window.$$guard.viewContext)||void 0===t?void 0:t.changeModule(n)]:[2/*return*/];case 1:return a.sent(),r?(requestIdleCallback((function(){var e;null===(e=window.$$guard.viewContext)||void 0===e||e.changeTab(r)})),[2/*return*/]):[2/*return*/]}}))}))},e.prototype.getAgreementsContext=function(){return window.$$guard.agreementsContext},e.prototype.checkAllAgreements=function(){var e=this.getAgreementsContext();null==e||e.checkAllAgreements()},e.prototype.unCheckAllAgreements=function(){var e=this.getAgreementsContext();null==e||e.unCheckAllAgreements()},e}()})();var i=a.RyY,s=a.pq3,l=a.mJU,u=a.m4P,c=a.G52,d=a.qKv,f=a.itr,p=a.btN,h=a.ntY,m=a.ph9,g=a.vQ2,v=a.KJ5,y=a.Vu5,_=a.NAz,b=a.BDx,w=a.Waj,M=a.BUF,k=a.vYO,L=a.$qm,S=a.Pd_,C=a.tiu,E=a.w_I,T=a.fMl,x=a.LIr,D=a.YYM,Y=a.ekm,P=a.lhk,O=a.B2n,N=a.Lpu,A=a.Z57,I=a.ws_,j=a.GeF,R=a.bGp,H=a.$fO,F=a.uVD,B=a.NwZ,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jr=a.$8$,Qr=a.wRn,Zr=a.GFd,Xr=a.S44,eo=a.lYd,to=a._vH,no=a.$qy,ro=a.W_N,oo=a.tPY,ao=a.cfU,io=a.lEM,so=a.NrF,lo=a.b1G,uo=a.PtZ,co=a.E6D,fo=a.AIM,po=a.b0D,ho=a.WJd,mo=a.uQX,go=a.ZmL,vo=a.aRt,yo=a.x94,_o=a.tbi,bo=a.hxx,wo=a.QL8,Mo=a.B9$,ko=a.vZy,Lo=a.ocf,So=a.pLj,Co=a.OVk,Eo=a.$R,To=a.j3,xo=a.hl1,Do=a.mk8,Yo=a.PqN,Po=a.ynv,Oo=a.dBC,No=a.M_L,Ao=a.cex,Io=a.z71,jo=a.wLl,Ro=a.ujl,Ho=a.z6o,Fo=a.msP,Bo=a.VUY,zo=a.EZR,Wo=a.yK6,Uo=a.Rnq,qo=a.uv0,Vo=a.GuS;export{i as AccessTokenDocument,s as AddMemberDocument,l as AddNodeDocument,u as AddNodeV2Document,c as AddPolicyAssignmentsDocument,d as AddUserToGroupDocument,f as AddWhitelistDocument,p as AllowDocument,h as ApiCode,m as AppPasswordStrengthLimit,g as ApplicationType,v as ArchivedUsersDocument,y as AssignRoleDocument,_ as AuthClientContext,b as AuthClientProvider,w as AuthenticationClient,M as AuthenticationTokenProvider,k as AuthorizeResourceDocument,L as AuthorizedResourcesDocument,S as AuthorizedTargetsDocument,C as BindEmailDocument,E as BindPhoneDocument,T as ChangeMfaDocument,x as ChangeModuleApiCodeMapping,D as CheckLoginStatusDocument,Y as CheckPasswordStrengthDocument,P as ChildrenNodesDocument,O as CodeAction,N as ConfigEmailTemplateDocument,A as CreateFunctionDocument,I as CreateGroupDocument,j as CreateOrgDocument,R as CreatePolicyDocument,H as CreateRoleDocument,F as CreateUserDocument,B as CreateUserWithCustomDataDocument,z as CreateUserpoolDocument,W as DeleteFunctionDocument,U as DeleteGroupsDocument,q as DeleteNodeDocument,V as DeleteOrgDocument,$ as DeletePoliciesDocument,G as DeletePolicyDocument,K as DeleteRoleDocument,J as DeleteRolesDocument,Q as DeleteUserDocument,Z as DeleteUserpoolDocument,X as DeleteUsersDocument,ee as DisableEmailTemplateDocument,te as DisbalePolicyAssignmentDocument,ne as EmailScene,re as EmailTemplateType,oe as EmailTemplatesDocument,ae as EnableEmailTemplateDocument,ie as EnablePolicyAssignmentDocument,se as ErrorCode,le as FindUserDocument,ue as FindUserWithCustomDataDocument,ce as FunctionDocument,de as FunctionsDocument,fe as GetUserDepartmentsDocument,pe as GetUserGroupsDocument,he as GetUserRolesDocument,me as GroupDocument,ge as GroupWithUsersDocument,ve as GroupWithUsersWithCustomDataDocument,ye as GroupsDocument,_e as Guard,be as GuardComponent,we as GuardEventsCamelToKebabMapping,Me as GuardHttp,ke as GuardMode,Le as GuardModuleType,Se as GuardPageSene,Ce as GuardPropsFilter,Ee as HIDE_SOCIALS,Te as HIDE_SOCIALS_SHOWIN_ENTERPRISE,xe as InputMethod,De as IsActionAllowedDocument,Ye as IsActionDeniedDocument,Pe as IsDomainAvaliableDocument,Oe as IsRootNodeDocument,Ne as IsUserExistsDocument,Ae as LanguageMap,Ie as ListGroupAuthorizedResourcesDocument,je as ListNodeByCodeAuthorizedResourcesDocument,Re as ListNodeByIdAuthorizedResourcesDocument,He as ListRoleAuthorizedResourcesDocument,Fe as ListUserAuthorizedResourcesDocument,Be as Logger,ze as LoginByEmailDocument,We as LoginByPhoneCodeDocument,Ue as LoginByPhonePasswordDocument,qe as LoginBySubAccountDocument,Ve as LoginByUsernameDocument,$e as LoginMethods,Ge as ManagementClient,Ke as ManagementTokenProvider,Je as MoveMembersDocument,Qe as MoveNodeDocument,Ze as MultipleTenant,Xe as NodeByCodeDocument,et as NodeByCodeWithMembersDocument,tt as NodeByIdDocument,nt as NodeByIdWithMembersDocument,rt as OIDCConnectionMode,ot as Operator,at as OrgDocument,it as OrgsDocument,st as PASSWORD_STRENGTH_TEXT_MAP,lt as PasswordSecurityLevel,ut as PasswordStrength,ct as PoliciesDocument,dt as PolicyAssignmentTargetType,ft as PolicyAssignmentsDocument,pt as PolicyDocument,ht as PolicyEffect,mt as PolicyWithAssignmentsDocument,gt as PreviewEmailDocument,vt as Protocol,yt as QiniuUptokenDocument,_t as QueryMfaDocument,bt as RefreshAccessTokenDocument,wt as RefreshTokenDocument,Mt as RefreshUserpoolSecretDocument,kt as RegisterByEmailDocument,Lt as RegisterByPhoneCodeDocument,St as RegisterByUsernameDocument,Ct as RegisterMethods,Et as RegisterSortMethods,Tt as RelayMethodEnum,xt as RemoveMemberDocument,Dt as RemovePolicyAssignmentsDocument,Yt as RemoveUdfDocument,Pt as RemoveUdvDocument,Ot as RemoveUserFromGroupDocument,Nt as RemoveWhitelistDocument,At as ResetPasswordByFirstLoginTokenDocument,It as ResetPasswordByForceResetTokenDocument,jt as ResetPasswordDocument,Rt as ResourceType,Ht as RevokeRoleDocument,Ft as RoleDocument,Bt as RoleWithUsersDocument,zt as RoleWithUsersWithCustomDataDocument,Wt as RolesDocument,Ut as RootNodeDocument,qt as SceneType,Vt as SearchNodesDocument,$t as SearchUserDocument,Gt as SearchUserWithCustomDataDocument,Kt as SendEmailDocument,Jt as SendFirstLoginVerifyEmailDocument,Qt as SetMainDepartmentDocument,Zt as SetUdfDocument,Xt as SetUdfValueBatchDocument,en as SetUdvBatchDocument,tn as SetUdvDocument,nn as SocialConnectionEvent,rn as SocialConnectionProvider,on as SortByEnum,an as SupportedAdminActionEnum,sn as SupportedUserActionEnum,ln as TemplateCodeDocument,un as UdfDataType,cn as UdfDocument,dn as UdfTargetType,fn as UdfValueBatchDocument,pn as UdvDocument,hn as UnbindEmailDocument,mn as UnbindPhoneDocument,gn as UpdateEmailDocument,vn as UpdateFunctionDocument,yn as UpdateGroupDocument,_n as UpdateNodeDocument,bn as UpdatePasswordDocument,wn as UpdatePhoneDocument,Mn as UpdatePolicyDocument,kn as UpdateRoleDocument,Ln as UpdateUserDocument,Sn as UpdateUserpoolDocument,Cn as UserBatchDocument,En as UserBatchWithCustomDataDocument,Tn as UserDocument,xn as UserStatus,Dn as UserWithCustomDataDocument,Yn as UserpoolDocument,Pn as UserpoolTypesDocument,On as UserpoolsDocument,Nn as UsersDocument,An as UsersWithCustomDataDocument,In as VALIDATE_PATTERN,jn as WhitelistDocument,Rn as WhitelistType,Hn as assembledRequestHost,Fn as copyToClipboard,Bn as corsVerification,zn as createGuardXContext,Wn as deepMerge,Un as errorCodeInterceptor,qn as faceErrorMessage,Vn as fallbackLng,$n as fieldRequiredRule,Gn as getAppendConfig,Kn as getCaptchaUrl,Jn as getClassnames,Qn as getCurrentLng,Zn as getDefaultG2Config,Xn as getDefaultGuardLocalConfig,er as getDeviceName,tr as getDocumentNode,nr as getFacePlugin,rr as getFlowHandle,or as getGuardHttp,ar as getHundreds,ir as getI18nLabel,sr as getLogger,lr as getLoginTypePipe,ur as getPageConfig,cr as getPasswordIdentify,dr as getPasswordValidate,fr as getPasswordValidateRules,pr as getPublicConfig,hr as getRequiredRules,mr as getSortLabels,gr as getSortTabs,vr as getSymbolTypeLength,yr as getUserRegisterParams,_r as getVersion,br as guardEventsFilter,wr as guardEventsHijacking,Mr as i18n,kr as initAppendConfig,Lr as initFacePlugin,Sr as initGuardHttp,Cr as initGuardI18n,Er as insertStyles,Tr as isAlipayBrowser,xr as isBaiduBrowser,Dr as isDingtalkBrowser,Yr as isDisabled,Pr as isEdgeBrowser,Or as isLarkBrowser,Nr as isMobile,Ar as isObject,Ir as isQQBrowser,jr as isQQBuiltInBrowser,Rr as isQtWebEngine,Hr as isSpecialBrowser,Fr as isWeChatBrowser,Br as isWeComeBrowser,zr as isWeWorkBuiltInBrowser,Wr as isWeiboBrowser,Ur as isXiaomiBrowser,qr as isoInfo,Vr as mailDesensitization,$r as parsePhone,Gr as phoneDesensitization,Kr as popupCenter,Jr as regexFromString,Qr as removeStyles,Zr as setPageConfig,Xr as setPublicConfig,eo as shoudGoToComplete,to as sleep,no as transformMethod,ro as transformSortMethod,oo as updateFlowHandle,ao as useAppId,io as useAppendConfig,so as useDebounce,lo as useFacePlugin,uo as useFetchConsoleConfig,co as useFlowHandle,fo as useGlobalAuthClient,po as useGuardAppId,ho as useGuardButtonContext,mo as useGuardButtonState,go as useGuardContextLoaded,vo as useGuardCurrentModule,yo as useGuardDefaultLanguage,_o as useGuardDefaultMergedConfig,bo as useGuardEvents,wo as useGuardFinallyConfig,Mo as useGuardHttp,ko as useGuardHttpClient,Lo as useGuardInitData,So as useGuardIsAuthFlow,Co as useGuardModule,Eo as useGuardMultipleInstance,To as useGuardPageConfig,xo as useGuardPhoneRegex,Do as useGuardPublicConfig,Yo as useGuardTenantId,Po as useGuardTenantProvider,Oo as useGuardView,No as useGuardXContext,Ao as useInitAppId,Io as useIsForeignUserpool,jo as useLogger,Ro as useMediaSize,Ho as useMergeDefaultConfig,Fo as useMethod,Bo as useMultipleTenant,zo as usePasswordErrorText,Wo as useRobotVerify,Uo as useShaking,qo as useUpdateFlowHandle,Vo as validate};
|
|
@@ -8,6 +8,7 @@ export declare class Guard {
|
|
|
8
8
|
constructor(options: GuardOptions);
|
|
9
9
|
private adaptOptions;
|
|
10
10
|
private getPublicConfig;
|
|
11
|
+
private getRequestHost;
|
|
11
12
|
getAuthClient(): Promise<AuthenticationClient>;
|
|
12
13
|
static getGuardContainer(selector?: string | HTMLElement): Element | null;
|
|
13
14
|
private eventListeners;
|
|
@@ -28,7 +29,9 @@ export declare class Guard {
|
|
|
28
29
|
handleRedirectCallback(): Promise<void>;
|
|
29
30
|
private getAccessTokenByCode;
|
|
30
31
|
private getCodeAndCodeChallenge;
|
|
31
|
-
private
|
|
32
|
+
private setTokenCache;
|
|
33
|
+
private clearTokenCache;
|
|
34
|
+
private clearLoginCache;
|
|
32
35
|
private parseUrlQuery;
|
|
33
36
|
/**
|
|
34
37
|
* 获取当前用户信息
|
package/package.json
CHANGED