@firebase/app-check 0.8.9 → 0.8.10

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.
Files changed (61) hide show
  1. package/dist/esm/index.esm2017.js +1632 -1632
  2. package/dist/esm/index.esm2017.js.map +1 -1
  3. package/dist/esm/src/api.d.ts +105 -105
  4. package/dist/esm/src/api.test.d.ts +17 -17
  5. package/dist/esm/src/client.d.ts +30 -30
  6. package/dist/esm/src/client.test.d.ts +17 -17
  7. package/dist/esm/src/constants.d.ts +40 -40
  8. package/dist/esm/src/debug.d.ts +22 -22
  9. package/dist/esm/src/debug.test.d.ts +17 -17
  10. package/dist/esm/src/errors.d.ts +61 -61
  11. package/dist/esm/src/factory.d.ts +31 -31
  12. package/dist/esm/src/index.d.ts +14 -14
  13. package/dist/esm/src/indexeddb.d.ts +22 -22
  14. package/dist/esm/src/internal-api.d.ts +44 -44
  15. package/dist/esm/src/internal-api.test.d.ts +17 -17
  16. package/dist/esm/src/logger.d.ts +18 -18
  17. package/dist/esm/src/proactive-refresh.d.ts +35 -35
  18. package/dist/esm/src/proactive-refresh.test.d.ts +17 -17
  19. package/dist/esm/src/providers.d.ts +108 -108
  20. package/dist/esm/src/providers.test.d.ts +17 -17
  21. package/dist/esm/src/public-types.d.ts +85 -85
  22. package/dist/esm/src/recaptcha.d.ts +43 -43
  23. package/dist/esm/src/recaptcha.test.d.ts +17 -17
  24. package/dist/esm/src/state.d.ts +54 -54
  25. package/dist/esm/src/storage.d.ts +27 -27
  26. package/dist/esm/src/storage.test.d.ts +17 -17
  27. package/dist/esm/src/types.d.ts +66 -66
  28. package/dist/esm/src/util.d.ts +21 -21
  29. package/dist/esm/test/setup.d.ts +17 -17
  30. package/dist/esm/test/util.d.ts +34 -34
  31. package/dist/index.cjs.js +1632 -1632
  32. package/dist/index.cjs.js.map +1 -1
  33. package/dist/src/api.d.ts +105 -105
  34. package/dist/src/api.test.d.ts +17 -17
  35. package/dist/src/client.d.ts +30 -30
  36. package/dist/src/client.test.d.ts +17 -17
  37. package/dist/src/constants.d.ts +40 -40
  38. package/dist/src/debug.d.ts +22 -22
  39. package/dist/src/debug.test.d.ts +17 -17
  40. package/dist/src/errors.d.ts +61 -61
  41. package/dist/src/factory.d.ts +31 -31
  42. package/dist/src/index.d.ts +14 -14
  43. package/dist/src/indexeddb.d.ts +22 -22
  44. package/dist/src/internal-api.d.ts +44 -44
  45. package/dist/src/internal-api.test.d.ts +17 -17
  46. package/dist/src/logger.d.ts +18 -18
  47. package/dist/src/proactive-refresh.d.ts +35 -35
  48. package/dist/src/proactive-refresh.test.d.ts +17 -17
  49. package/dist/src/providers.d.ts +108 -108
  50. package/dist/src/providers.test.d.ts +17 -17
  51. package/dist/src/public-types.d.ts +85 -85
  52. package/dist/src/recaptcha.d.ts +43 -43
  53. package/dist/src/recaptcha.test.d.ts +17 -17
  54. package/dist/src/state.d.ts +54 -54
  55. package/dist/src/storage.d.ts +27 -27
  56. package/dist/src/storage.test.d.ts +17 -17
  57. package/dist/src/types.d.ts +66 -66
  58. package/dist/src/util.d.ts +21 -21
  59. package/dist/test/setup.d.ts +17 -17
  60. package/dist/test/util.d.ts +34 -34
  61. package/package.json +6 -6
@@ -1,31 +1,31 @@
1
- /**
2
- * @license
3
- * Copyright 2020 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { AppCheck } from './public-types';
18
- import { FirebaseApp, _FirebaseService } from '@firebase/app';
19
- import { FirebaseAppCheckInternal } from './types';
20
- import { Provider } from '@firebase/component';
21
- /**
22
- * AppCheck Service class.
23
- */
24
- export declare class AppCheckService implements AppCheck, _FirebaseService {
25
- app: FirebaseApp;
26
- heartbeatServiceProvider: Provider<'heartbeat'>;
27
- constructor(app: FirebaseApp, heartbeatServiceProvider: Provider<'heartbeat'>);
28
- _delete(): Promise<void>;
29
- }
30
- export declare function factory(app: FirebaseApp, heartbeatServiceProvider: Provider<'heartbeat'>): AppCheckService;
31
- export declare function internalFactory(appCheck: AppCheckService): FirebaseAppCheckInternal;
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { AppCheck } from './public-types';
18
+ import { FirebaseApp, _FirebaseService } from '@firebase/app';
19
+ import { FirebaseAppCheckInternal } from './types';
20
+ import { Provider } from '@firebase/component';
21
+ /**
22
+ * AppCheck Service class.
23
+ */
24
+ export declare class AppCheckService implements AppCheck, _FirebaseService {
25
+ app: FirebaseApp;
26
+ heartbeatServiceProvider: Provider<'heartbeat'>;
27
+ constructor(app: FirebaseApp, heartbeatServiceProvider: Provider<'heartbeat'>);
28
+ _delete(): Promise<void>;
29
+ }
30
+ export declare function factory(app: FirebaseApp, heartbeatServiceProvider: Provider<'heartbeat'>): AppCheckService;
31
+ export declare function internalFactory(appCheck: AppCheckService): FirebaseAppCheckInternal;
@@ -1,14 +1,14 @@
1
- /**
2
- * The Firebase App Check Web SDK.
3
- *
4
- * @remarks
5
- * Firebase App Check does not work in a Node.js environment using `ReCaptchaV3Provider` or
6
- * `ReCaptchaEnterpriseProvider`, but can be used in Node.js if you use
7
- * `CustomProvider` and write your own attestation method.
8
- *
9
- * @packageDocumentation
10
- */
11
- import { _AppCheckInternalComponentName } from './types';
12
- export { _AppCheckInternalComponentName };
13
- export * from './api';
14
- export * from './public-types';
1
+ /**
2
+ * The Firebase App Check Web SDK.
3
+ *
4
+ * @remarks
5
+ * Firebase App Check does not work in a Node.js environment using `ReCaptchaV3Provider` or
6
+ * `ReCaptchaEnterpriseProvider`, but can be used in Node.js if you use
7
+ * `CustomProvider` and write your own attestation method.
8
+ *
9
+ * @packageDocumentation
10
+ */
11
+ import { _AppCheckInternalComponentName } from './types';
12
+ export { _AppCheckInternalComponentName };
13
+ export * from './api';
14
+ export * from './public-types';
@@ -1,22 +1,22 @@
1
- /**
2
- * @license
3
- * Copyright 2020 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { FirebaseApp } from '@firebase/app';
18
- import { AppCheckTokenInternal } from './types';
19
- export declare function readTokenFromIndexedDB(app: FirebaseApp): Promise<AppCheckTokenInternal | undefined>;
20
- export declare function writeTokenToIndexedDB(app: FirebaseApp, token?: AppCheckTokenInternal): Promise<void>;
21
- export declare function writeDebugTokenToIndexedDB(token: string): Promise<void>;
22
- export declare function readDebugTokenFromIndexedDB(): Promise<string | undefined>;
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { FirebaseApp } from '@firebase/app';
18
+ import { AppCheckTokenInternal } from './types';
19
+ export declare function readTokenFromIndexedDB(app: FirebaseApp): Promise<AppCheckTokenInternal | undefined>;
20
+ export declare function writeTokenToIndexedDB(app: FirebaseApp, token?: AppCheckTokenInternal): Promise<void>;
21
+ export declare function writeDebugTokenToIndexedDB(token: string): Promise<void>;
22
+ export declare function readDebugTokenFromIndexedDB(): Promise<string | undefined>;
@@ -1,44 +1,44 @@
1
- /**
2
- * @license
3
- * Copyright 2020 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { FirebaseApp } from '@firebase/app';
18
- import { AppCheckTokenResult, AppCheckTokenInternal, ListenerType } from './types';
19
- import { AppCheckTokenListener } from './public-types';
20
- import { AppCheckService } from './factory';
21
- export declare const defaultTokenErrorData: {
22
- error: string;
23
- };
24
- /**
25
- * Stringify and base64 encode token error data.
26
- *
27
- * @param tokenError Error data, currently hardcoded.
28
- */
29
- export declare function formatDummyToken(tokenErrorData: Record<string, string>): string;
30
- /**
31
- * This function always resolves.
32
- * The result will contain an error field if there is any error.
33
- * In case there is an error, the token field in the result will be populated with a dummy value
34
- */
35
- export declare function getToken(appCheck: AppCheckService, forceRefresh?: boolean): Promise<AppCheckTokenResult>;
36
- /**
37
- * Internal API for limited use tokens. Skips all FAC state and simply calls
38
- * the underlying provider.
39
- */
40
- export declare function getLimitedUseToken(appCheck: AppCheckService): Promise<AppCheckTokenResult>;
41
- export declare function addTokenListener(appCheck: AppCheckService, type: ListenerType, listener: AppCheckTokenListener, onError?: (error: Error) => void): void;
42
- export declare function removeTokenListener(app: FirebaseApp, listener: AppCheckTokenListener): void;
43
- export declare function notifyTokenListeners(app: FirebaseApp, token: AppCheckTokenResult): void;
44
- export declare function isValid(token: AppCheckTokenInternal): boolean;
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { FirebaseApp } from '@firebase/app';
18
+ import { AppCheckTokenResult, AppCheckTokenInternal, ListenerType } from './types';
19
+ import { AppCheckTokenListener } from './public-types';
20
+ import { AppCheckService } from './factory';
21
+ export declare const defaultTokenErrorData: {
22
+ error: string;
23
+ };
24
+ /**
25
+ * Stringify and base64 encode token error data.
26
+ *
27
+ * @param tokenError Error data, currently hardcoded.
28
+ */
29
+ export declare function formatDummyToken(tokenErrorData: Record<string, string>): string;
30
+ /**
31
+ * This function always resolves.
32
+ * The result will contain an error field if there is any error.
33
+ * In case there is an error, the token field in the result will be populated with a dummy value
34
+ */
35
+ export declare function getToken(appCheck: AppCheckService, forceRefresh?: boolean): Promise<AppCheckTokenResult>;
36
+ /**
37
+ * Internal API for limited use tokens. Skips all FAC state and simply calls
38
+ * the underlying provider.
39
+ */
40
+ export declare function getLimitedUseToken(appCheck: AppCheckService): Promise<AppCheckTokenResult>;
41
+ export declare function addTokenListener(appCheck: AppCheckService, type: ListenerType, listener: AppCheckTokenListener, onError?: (error: Error) => void): void;
42
+ export declare function removeTokenListener(app: FirebaseApp, listener: AppCheckTokenListener): void;
43
+ export declare function notifyTokenListeners(app: FirebaseApp, token: AppCheckTokenResult): void;
44
+ export declare function isValid(token: AppCheckTokenInternal): boolean;
@@ -1,17 +1,17 @@
1
- /**
2
- * @license
3
- * Copyright 2020 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import '../test/setup';
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import '../test/setup';
@@ -1,18 +1,18 @@
1
- /**
2
- * @license
3
- * Copyright 2020 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { Logger } from '@firebase/logger';
18
- export declare const logger: Logger;
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { Logger } from '@firebase/logger';
18
+ export declare const logger: Logger;
@@ -1,35 +1,35 @@
1
- /**
2
- * @license
3
- * Copyright 2020 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- /**
18
- * Port from auth proactiverefresh.js
19
- *
20
- */
21
- export declare class Refresher {
22
- private readonly operation;
23
- private readonly retryPolicy;
24
- private readonly getWaitDuration;
25
- private readonly lowerBound;
26
- private readonly upperBound;
27
- private pending;
28
- private nextErrorWaitInterval;
29
- constructor(operation: () => Promise<unknown>, retryPolicy: (error: unknown) => boolean, getWaitDuration: () => number, lowerBound: number, upperBound: number);
30
- start(): void;
31
- stop(): void;
32
- isRunning(): boolean;
33
- private process;
34
- private getNextRun;
35
- }
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * Port from auth proactiverefresh.js
19
+ *
20
+ */
21
+ export declare class Refresher {
22
+ private readonly operation;
23
+ private readonly retryPolicy;
24
+ private readonly getWaitDuration;
25
+ private readonly lowerBound;
26
+ private readonly upperBound;
27
+ private pending;
28
+ private nextErrorWaitInterval;
29
+ constructor(operation: () => Promise<unknown>, retryPolicy: (error: unknown) => boolean, getWaitDuration: () => number, lowerBound: number, upperBound: number);
30
+ start(): void;
31
+ stop(): void;
32
+ isRunning(): boolean;
33
+ private process;
34
+ private getNextRun;
35
+ }
@@ -1,17 +1,17 @@
1
- /**
2
- * @license
3
- * Copyright 2020 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import '../test/setup';
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import '../test/setup';
@@ -1,108 +1,108 @@
1
- /**
2
- * @license
3
- * Copyright 2021 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { FirebaseApp } from '@firebase/app';
18
- import { CustomProviderOptions } from './public-types';
19
- import { AppCheckProvider, AppCheckTokenInternal } from './types';
20
- /**
21
- * App Check provider that can obtain a reCAPTCHA V3 token and exchange it
22
- * for an App Check token.
23
- *
24
- * @public
25
- */
26
- export declare class ReCaptchaV3Provider implements AppCheckProvider {
27
- private _siteKey;
28
- private _app?;
29
- private _heartbeatServiceProvider?;
30
- /**
31
- * Throttle requests on certain error codes to prevent too many retries
32
- * in a short time.
33
- */
34
- private _throttleData;
35
- /**
36
- * Create a ReCaptchaV3Provider instance.
37
- * @param siteKey - ReCAPTCHA V3 siteKey.
38
- */
39
- constructor(_siteKey: string);
40
- /**
41
- * Returns an App Check token.
42
- * @internal
43
- */
44
- getToken(): Promise<AppCheckTokenInternal>;
45
- /**
46
- * @internal
47
- */
48
- initialize(app: FirebaseApp): void;
49
- /**
50
- * @internal
51
- */
52
- isEqual(otherProvider: unknown): boolean;
53
- }
54
- /**
55
- * App Check provider that can obtain a reCAPTCHA Enterprise token and exchange it
56
- * for an App Check token.
57
- *
58
- * @public
59
- */
60
- export declare class ReCaptchaEnterpriseProvider implements AppCheckProvider {
61
- private _siteKey;
62
- private _app?;
63
- private _heartbeatServiceProvider?;
64
- /**
65
- * Throttle requests on certain error codes to prevent too many retries
66
- * in a short time.
67
- */
68
- private _throttleData;
69
- /**
70
- * Create a ReCaptchaEnterpriseProvider instance.
71
- * @param siteKey - reCAPTCHA Enterprise score-based site key.
72
- */
73
- constructor(_siteKey: string);
74
- /**
75
- * Returns an App Check token.
76
- * @internal
77
- */
78
- getToken(): Promise<AppCheckTokenInternal>;
79
- /**
80
- * @internal
81
- */
82
- initialize(app: FirebaseApp): void;
83
- /**
84
- * @internal
85
- */
86
- isEqual(otherProvider: unknown): boolean;
87
- }
88
- /**
89
- * Custom provider class.
90
- * @public
91
- */
92
- export declare class CustomProvider implements AppCheckProvider {
93
- private _customProviderOptions;
94
- private _app?;
95
- constructor(_customProviderOptions: CustomProviderOptions);
96
- /**
97
- * @internal
98
- */
99
- getToken(): Promise<AppCheckTokenInternal>;
100
- /**
101
- * @internal
102
- */
103
- initialize(app: FirebaseApp): void;
104
- /**
105
- * @internal
106
- */
107
- isEqual(otherProvider: unknown): boolean;
108
- }
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { FirebaseApp } from '@firebase/app';
18
+ import { CustomProviderOptions } from './public-types';
19
+ import { AppCheckProvider, AppCheckTokenInternal } from './types';
20
+ /**
21
+ * App Check provider that can obtain a reCAPTCHA V3 token and exchange it
22
+ * for an App Check token.
23
+ *
24
+ * @public
25
+ */
26
+ export declare class ReCaptchaV3Provider implements AppCheckProvider {
27
+ private _siteKey;
28
+ private _app?;
29
+ private _heartbeatServiceProvider?;
30
+ /**
31
+ * Throttle requests on certain error codes to prevent too many retries
32
+ * in a short time.
33
+ */
34
+ private _throttleData;
35
+ /**
36
+ * Create a ReCaptchaV3Provider instance.
37
+ * @param siteKey - ReCAPTCHA V3 siteKey.
38
+ */
39
+ constructor(_siteKey: string);
40
+ /**
41
+ * Returns an App Check token.
42
+ * @internal
43
+ */
44
+ getToken(): Promise<AppCheckTokenInternal>;
45
+ /**
46
+ * @internal
47
+ */
48
+ initialize(app: FirebaseApp): void;
49
+ /**
50
+ * @internal
51
+ */
52
+ isEqual(otherProvider: unknown): boolean;
53
+ }
54
+ /**
55
+ * App Check provider that can obtain a reCAPTCHA Enterprise token and exchange it
56
+ * for an App Check token.
57
+ *
58
+ * @public
59
+ */
60
+ export declare class ReCaptchaEnterpriseProvider implements AppCheckProvider {
61
+ private _siteKey;
62
+ private _app?;
63
+ private _heartbeatServiceProvider?;
64
+ /**
65
+ * Throttle requests on certain error codes to prevent too many retries
66
+ * in a short time.
67
+ */
68
+ private _throttleData;
69
+ /**
70
+ * Create a ReCaptchaEnterpriseProvider instance.
71
+ * @param siteKey - reCAPTCHA Enterprise score-based site key.
72
+ */
73
+ constructor(_siteKey: string);
74
+ /**
75
+ * Returns an App Check token.
76
+ * @internal
77
+ */
78
+ getToken(): Promise<AppCheckTokenInternal>;
79
+ /**
80
+ * @internal
81
+ */
82
+ initialize(app: FirebaseApp): void;
83
+ /**
84
+ * @internal
85
+ */
86
+ isEqual(otherProvider: unknown): boolean;
87
+ }
88
+ /**
89
+ * Custom provider class.
90
+ * @public
91
+ */
92
+ export declare class CustomProvider implements AppCheckProvider {
93
+ private _customProviderOptions;
94
+ private _app?;
95
+ constructor(_customProviderOptions: CustomProviderOptions);
96
+ /**
97
+ * @internal
98
+ */
99
+ getToken(): Promise<AppCheckTokenInternal>;
100
+ /**
101
+ * @internal
102
+ */
103
+ initialize(app: FirebaseApp): void;
104
+ /**
105
+ * @internal
106
+ */
107
+ isEqual(otherProvider: unknown): boolean;
108
+ }
@@ -1,17 +1,17 @@
1
- /**
2
- * @license
3
- * Copyright 2021 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import '../test/setup';
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import '../test/setup';