isp-ui-kit 2.2.0 → 2.3.1
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/hooks/useAuth.d.ts +8 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/hooks/useAuth.d.ts
CHANGED
|
@@ -7,11 +7,15 @@ export interface AuthResponse {
|
|
|
7
7
|
headerName: string;
|
|
8
8
|
token: string;
|
|
9
9
|
}
|
|
10
|
-
export interface
|
|
10
|
+
export interface OAuthRequest {
|
|
11
11
|
authCode: string;
|
|
12
|
+
clientName: string;
|
|
13
|
+
}
|
|
14
|
+
export interface OAuthLoginResponse {
|
|
15
|
+
loginUrl: string;
|
|
12
16
|
}
|
|
13
17
|
export interface IsLogged {
|
|
14
|
-
type: 'basic' | '
|
|
18
|
+
type: 'basic' | 'oAuth';
|
|
15
19
|
value: boolean;
|
|
16
20
|
}
|
|
17
21
|
interface UseAuth {
|
|
@@ -19,7 +23,8 @@ interface UseAuth {
|
|
|
19
23
|
isLoading: boolean;
|
|
20
24
|
login: (path: string, data: UserData, headers?: Record<string, string>) => Promise<AuthResponse>;
|
|
21
25
|
logout: (path: string, headers?: Record<string, string>) => Promise<void>;
|
|
22
|
-
|
|
26
|
+
oAuthLogin: (path: string, data: OAuthRequest, headers?: Record<string, string>) => Promise<OAuthLoginResponse>;
|
|
27
|
+
oAuthLogout: (path: string, data: OAuthRequest, headers?: Record<string, string>) => Promise<void>;
|
|
23
28
|
}
|
|
24
29
|
declare const useAuth: () => UseAuth;
|
|
25
30
|
export default useAuth;
|