@pubinfo/module-auth 2.0.12 → 2.0.14

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/core.d.ts CHANGED
@@ -1,9 +1,4 @@
1
1
  import { Recordable, ThirdParty } from './interface';
2
- /**
3
- * 获取指定的 `Provider`
4
- * @param id
5
- */
6
- export declare function getProvider(id?: ThirdParty): import('./interface').ProviderConfig;
7
2
  /**
8
3
  * 前往登录
9
4
  * @param id 唯一值
@@ -23,7 +18,7 @@ export declare function renderQRCode(id: ThirdParty, options: {
23
18
  * 认证
24
19
  * @param id 第三方的唯一值
25
20
  */
26
- export declare function authentication(id: ThirdParty): Promise<any>;
21
+ export declare function authenticate(id: ThirdParty): Promise<any>;
27
22
  /**
28
23
  * 重定向至统一登录页
29
24
  */
@@ -0,0 +1,22 @@
1
+ import { ProviderUserOptions, Recordable, ThirdParty } from './interface';
2
+ /**
3
+ * 获取指定的 `Provider`
4
+ * @param id
5
+ */
6
+ export declare function getProvider(id?: ThirdParty): import('./interface').ProviderOptions;
7
+ /**
8
+ * 构建第三方授权登录地址
9
+ * @param provider
10
+ */
11
+ export declare function createUrlByProvider(provider: ProviderUserOptions): string;
12
+ /**
13
+ * 构建携带 `params` 的 URL
14
+ * @param url
15
+ * @param params
16
+ */
17
+ export declare function createUrl(url?: string, params?: Recordable): string;
18
+ /**
19
+ * 读取 `URL` 上的 `params` 参数
20
+ * @param url
21
+ */
22
+ export declare function readUrlParams(url?: string): URLSearchParams;
package/dist/index.d.ts CHANGED
@@ -2,5 +2,5 @@ import { ModuleOptions } from 'pubinfo';
2
2
  import { AuthOptions } from './interface';
3
3
  export declare function auth(options: AuthOptions): ModuleOptions;
4
4
  export { LoginWithFourA } from './components/LoginWithFourA';
5
- export { authentication, redirect, renderQRCode, signIn, } from './core';
5
+ export { authenticate, redirect, renderQRCode, signIn, } from './core';
6
6
  export * from './interface';