@authing/guard-shim-react 4.5.40-hep.1 → 4.5.40-hep.11
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 +2123 -2111
- package/dist/typings/src/GuardFactory/index.d.ts +83 -0
- package/dist/typings/src/Login/hooks/useLoginMultiple.d.ts +1 -1
- package/dist/typings/src/Type/application.d.ts +3 -0
- package/dist/typings/src/ValidatorRules/PasswordFormItem.d.ts +1 -0
- package/dist/typings/src/_utils/config/index.d.ts +1 -1
- package/dist/typings/src/_utils/context.d.ts +1 -1
- package/dist/typings/src/index.cdn.d.ts +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { React } from 'shim-react';
|
|
2
|
+
import { GuardEventsKebabToCamelType, GuardModuleType, GuardMode, IG2FCProps, IG2Config, User, Lang, AuthenticationClient } from '../';
|
|
3
|
+
export * from '../';
|
|
4
|
+
export interface GuardFactoryOptions extends IG2FCProps {
|
|
5
|
+
appId: string;
|
|
6
|
+
host?: string;
|
|
7
|
+
redirectUri?: string;
|
|
8
|
+
mode?: GuardMode;
|
|
9
|
+
defaultScene?: GuardModuleType;
|
|
10
|
+
tenantId?: string;
|
|
11
|
+
lang?: Lang;
|
|
12
|
+
isSSO?: boolean;
|
|
13
|
+
config?: Partial<IG2Config>;
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
export interface GuardEventListeners {
|
|
17
|
+
[key: string]: Function[];
|
|
18
|
+
}
|
|
19
|
+
export interface StartWithRedirectOptions {
|
|
20
|
+
codeChallengeMethod?: 'S256' | 'plain';
|
|
21
|
+
scope?: string;
|
|
22
|
+
state?: string;
|
|
23
|
+
responseType?: 'code' | 'code id_token token' | 'code id_token' | 'code token' | 'id_token token' | 'id_token' | 'none';
|
|
24
|
+
responseMode?: 'query' | 'fragment' | 'form_post';
|
|
25
|
+
nonce?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface LogoutParams {
|
|
28
|
+
redirectUri?: string;
|
|
29
|
+
quitCurrentDevice?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare class GuardFactory {
|
|
32
|
+
options: GuardFactoryOptions;
|
|
33
|
+
private visible;
|
|
34
|
+
private then;
|
|
35
|
+
private publicConfig?;
|
|
36
|
+
constructor(options: GuardFactoryOptions);
|
|
37
|
+
private adaptOptions;
|
|
38
|
+
private getRequestHost;
|
|
39
|
+
private getPublicConfig;
|
|
40
|
+
getAuthClient(): Promise<AuthenticationClient>;
|
|
41
|
+
static getGuardContainer(selector?: string | HTMLElement): Element | null;
|
|
42
|
+
private eventListeners;
|
|
43
|
+
/**
|
|
44
|
+
* 启动嵌入模式
|
|
45
|
+
* @param el String
|
|
46
|
+
* @returns Promise
|
|
47
|
+
*/
|
|
48
|
+
start(el?: string): Promise<User>;
|
|
49
|
+
startRegister(): void;
|
|
50
|
+
checkLoginStatus(): Promise<any | undefined>;
|
|
51
|
+
changeLang(lang: Lang): void;
|
|
52
|
+
changeContentCSS(contentCSS: string): void;
|
|
53
|
+
/**
|
|
54
|
+
* 启动跳转模式
|
|
55
|
+
*/
|
|
56
|
+
startWithRedirect(options?: StartWithRedirectOptions): Promise<void>;
|
|
57
|
+
handleRedirectCallback(): Promise<void>;
|
|
58
|
+
private getAccessTokenByCode;
|
|
59
|
+
private getCodeAndCodeChallenge;
|
|
60
|
+
private setTokenCache;
|
|
61
|
+
private clearTokenCache;
|
|
62
|
+
private clearLoginCache;
|
|
63
|
+
private parseUrlQuery;
|
|
64
|
+
/**
|
|
65
|
+
* 获取当前用户信息
|
|
66
|
+
*/
|
|
67
|
+
trackSession(): Promise<User | null>;
|
|
68
|
+
logout(params?: LogoutParams): Promise<void>;
|
|
69
|
+
render(): Promise<void | Element | React.Component<any, any, any>>;
|
|
70
|
+
on<T extends keyof GuardEventsKebabToCamelType>(evt: T, handler: (userInfo: User) => void): void;
|
|
71
|
+
show(): void;
|
|
72
|
+
hide(): void;
|
|
73
|
+
unmount(): void;
|
|
74
|
+
getCurrentView(): {
|
|
75
|
+
currentModule: any;
|
|
76
|
+
currentTab: any;
|
|
77
|
+
};
|
|
78
|
+
changeView(currentView: string): Promise<void>;
|
|
79
|
+
private getAgreementsContext;
|
|
80
|
+
checkAllAgreements(): void;
|
|
81
|
+
unCheckAllAgreements(): void;
|
|
82
|
+
}
|
|
83
|
+
export default GuardFactory;
|
|
@@ -39,7 +39,7 @@ declare function useLoginSelectAccount(setLoginWay: React.Dispatch<any>): {
|
|
|
39
39
|
id: string;
|
|
40
40
|
loginAccount?: string | undefined;
|
|
41
41
|
usertype?: string | undefined;
|
|
42
|
-
}, "
|
|
42
|
+
}, "tab" | "way" | "phoneCountryCode">) => void;
|
|
43
43
|
setLoginWayByHttpData: (account: string, data: {
|
|
44
44
|
username?: string | undefined;
|
|
45
45
|
phone?: string | undefined;
|
|
@@ -272,6 +272,7 @@ export interface ApplicationConfig {
|
|
|
272
272
|
identifier: string;
|
|
273
273
|
requestHostname: string;
|
|
274
274
|
identityProviders: {
|
|
275
|
+
id: string;
|
|
275
276
|
identifier: string;
|
|
276
277
|
protocol: Protocol;
|
|
277
278
|
displayName: string;
|
|
@@ -386,4 +387,6 @@ export interface ApplicationConfig {
|
|
|
386
387
|
};
|
|
387
388
|
/** 特殊浏览器匹配字符串 */
|
|
388
389
|
specialBrowserSymbols?: string[];
|
|
390
|
+
/** 密码策略 message 提示 */
|
|
391
|
+
passwordCheckMessage?: string;
|
|
389
392
|
}
|
|
@@ -4,5 +4,6 @@ export interface PasswordFormItemProps extends FormItemProps {
|
|
|
4
4
|
}
|
|
5
5
|
export interface ExPasswordFormItemProps extends PasswordFormItemProps {
|
|
6
6
|
fieldRequiredRuleMessage?: string;
|
|
7
|
+
noCheckSecond?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare const PasswordFormItem: React.FC<ExPasswordFormItemProps>;
|
|
@@ -53,7 +53,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
|
|
|
53
53
|
loginMethods?: LoginMethods[] | undefined;
|
|
54
54
|
passwordLoginMethods?: string[] | undefined;
|
|
55
55
|
socialConnections?: import("../../Type").SocialConnectionProvider[] | undefined;
|
|
56
|
-
socialConnectionsBtnShape?: "
|
|
56
|
+
socialConnectionsBtnShape?: "default" | "button" | "icon" | undefined;
|
|
57
57
|
enterpriseConnections?: string[] | undefined;
|
|
58
58
|
qrCodeScanOptions?: {
|
|
59
59
|
extIdpConnId?: string | undefined;
|
|
@@ -123,7 +123,7 @@ export declare const useGuardAccountSelectInstance: () => {
|
|
|
123
123
|
id: string;
|
|
124
124
|
loginAccount?: string | undefined;
|
|
125
125
|
usertype?: string | undefined;
|
|
126
|
-
}, "
|
|
126
|
+
}, "tab" | "way" | "phoneCountryCode">) => void;
|
|
127
127
|
setLoginWayByHttpData: (account: string, data: {
|
|
128
128
|
username?: string | undefined;
|
|
129
129
|
phone?: string | undefined;
|
package/package.json
CHANGED