Files
app-check/AppCheckCore/Sources/Public/AppCheckCore/GACDeviceCheckProvider.h
T
Andrew Heard b12f472db8 Rename instanceName and storageID to serviceName (#11599)
For consistency, renamed both instanceName and storageID to serviceName for consistency.

In all cases, the serviceName is an identifier that differentiates multiple GACAppCheck instances such as when there are multiple FIRApps in use, or multiple dependent SDKs (e.g., Firebase and Google Sign-In). This unique identifier ensures their state is not shared in the Keychain or in User Defaults.
2023-08-01 13:48:42 -04:00

57 lines
2.2 KiB
Objective-C

/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#import <Foundation/Foundation.h>
#import "GACAppCheckAvailability.h"
#import "GACAppCheckProvider.h"
#if GAC_DEVICE_CHECK_SUPPORTED_TARGETS
@protocol GACDeviceCheckAPIServiceProtocol;
@protocol GACDeviceCheckTokenGenerator;
NS_ASSUME_NONNULL_BEGIN
/// Firebase App Check provider that verifies app integrity using the
/// [DeviceCheck](https://developer.apple.com/documentation/devicecheck) API.
/// This class is available on all platforms for select OS versions. See
/// https://firebase.google.com/docs/ios/learn-more for more details.
GAC_DEVICE_CHECK_PROVIDER_AVAILABILITY
NS_SWIFT_NAME(AppCheckCoreDeviceCheckProvider)
@interface GACDeviceCheckProvider : NSObject <GACAppCheckProvider>
- (instancetype)init NS_UNAVAILABLE;
/// The default initializer.
/// @param serviceName A unique identifier to differentiate storage keys corresponding to the same
/// `resourceName`; may be a Firebase App Name or an SDK name.
/// @param resourceName The name of the resource protected by App Check; for a Firebase App this is
/// "projects/{project_id}/apps/{app_id}".
/// @param APIKey The Google Cloud Platform API key, if needed, or nil.
/// @param requestHooks Hooks that will be invoked on requests through this service.
/// @return An instance of `DeviceCheckProvider` .
- (instancetype)initWithServiceName:(NSString *)serviceName
resourceName:(NSString *)resourceName
APIKey:(nullable NSString *)APIKey
requestHooks:(nullable NSArray<GACAppCheckAPIRequestHook> *)requestHooks;
@end
NS_ASSUME_NONNULL_END
#endif // GAC_DEVICE_CHECK_SUPPORTED_TARGETS