|
| 1 | +// Copyright 2026 Google LLC |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +#ifndef FIREBASE_APP_CHECK_SRC_INCLUDE_FIREBASE_APP_CHECK_RECAPTCHA_ENTERPRISE_PROVIDER_H_ |
| 16 | +#define FIREBASE_APP_CHECK_SRC_INCLUDE_FIREBASE_APP_CHECK_RECAPTCHA_ENTERPRISE_PROVIDER_H_ |
| 17 | + |
| 18 | +#include "firebase/app_check.h" |
| 19 | + |
| 20 | +namespace firebase { |
| 21 | +namespace app_check { |
| 22 | + |
| 23 | +namespace internal { |
| 24 | +class RecaptchaEnterpriseProviderFactoryInternal; |
| 25 | +} |
| 26 | + |
| 27 | +/// Implementation of an {@link AppCheckProviderFactory} that builds |
| 28 | +/// RecaptchaEnterpriseProviders. This is the default implementation. |
| 29 | +class RecaptchaEnterpriseProviderFactory : public AppCheckProviderFactory { |
| 30 | + public: |
| 31 | +#if !defined(DOXYGEN) |
| 32 | + RecaptchaEnterpriseProviderFactory(const RecaptchaEnterpriseProviderFactory&) = delete; |
| 33 | + RecaptchaEnterpriseProviderFactory& operator=(const RecaptchaEnterpriseProviderFactory&) = |
| 34 | + delete; |
| 35 | +#endif // !defined(DOXYGEN) |
| 36 | + |
| 37 | + /// Gets an instance of this class for installation into a |
| 38 | + /// firebase::app_check::AppCheck instance. |
| 39 | + static RecaptchaEnterpriseProviderFactory* GetInstance(); |
| 40 | + |
| 41 | + /// Gets the AppCheckProvider associated with the given |
| 42 | + /// {@link App} instance, or creates one if none |
| 43 | + /// already exists. |
| 44 | + firebase::app_check::AppCheckProvider* CreateProvider(App* app) override; |
| 45 | + |
| 46 | + private: |
| 47 | + RecaptchaEnterpriseProviderFactory(); |
| 48 | + ~RecaptchaEnterpriseProviderFactory() override; |
| 49 | + |
| 50 | + internal::RecaptchaEnterpriseProviderFactoryInternal* internal_; |
| 51 | +}; |
| 52 | + |
| 53 | +} // namespace app_check |
| 54 | +} // namespace firebase |
| 55 | + |
| 56 | +#endif // FIREBASE_APP_CHECK_SRC_INCLUDE_FIREBASE_APP_CHECK_RECAPTCHA_ENTERPRISE_PROVIDER_H_ |
0 commit comments