1616
1717#import < Foundation/Foundation.h>
1818
19+ @import FirebaseAppCheckInterop;
20+
1921@class FIRApp;
2022@class FIRAppCheckToken;
2123@protocol FIRAppCheckProviderFactory;
@@ -36,7 +38,7 @@ FOUNDATION_EXPORT NSString *const kFIRAppCheckAppNameNotificationKey NS_SWIFT_NA
3638
3739// / A class used to manage app check tokens for a given Firebase app.
3840NS_SWIFT_NAME (AppCheck)
39- @interface FIRAppCheck : NSObject
41+ @interface FIRAppCheck : NSObject <FIRAppCheckProtocol>
4042
4143- (instancetype )init NS_UNAVAILABLE;
4244
@@ -52,36 +54,6 @@ NS_SWIFT_NAME(AppCheck)
5254// / @throw Throws an exception if required `FirebaseApp` options are missing.
5355+ (nullable instancetype )appCheckWithApp:(FIRApp *)firebaseApp NS_SWIFT_NAME (appCheck(app:));
5456
55- // / Requests Firebase app check token. This method should *only* be used if you need to authorize
56- // / requests to a non-Firebase backend. Requests to Firebase backend are authorized automatically if
57- // / configured.
58- // /
59- // / If your non-Firebase backend exposes sensitive or expensive endpoints that have low traffic
60- // / volume, consider protecting it with [Replay
61- // / Protection](https://firebase.google.com/docs/app-check/custom-resource-backend#replay-protection).
62- // / In this case, use the ``limitedUseToken(completion:)`` instead to obtain a limited-use token.
63- // / @param forcingRefresh If `YES`, a new Firebase app check token is requested and the token
64- // / cache is ignored. If `NO`, the cached token is used if it exists and has not expired yet. In
65- // / most cases, `NO` should be used. `YES` should only be used if the server explicitly returns an
66- // / error, indicating a revoked token.
67- // / @param handler The completion handler. Includes the app check token if the request succeeds,
68- // / or an error if the request fails.
69- - (void )tokenForcingRefresh:(BOOL )forcingRefresh
70- completion:
71- (void (^)(FIRAppCheckToken *_Nullable token, NSError *_Nullable error))handler
72- NS_SWIFT_NAME (token(forcingRefresh:completion:));
73-
74- // / Requests a limited-use Firebase App Check token. This method should be used only if you need to
75- // / authorize requests to a non-Firebase backend.
76- // /
77- // / Returns limited-use tokens that are intended for use with your non-Firebase backend endpoints
78- // / that are protected with [Replay
79- // / Protection](https://firebase.google.com/docs/app-check/custom-resource-backend#replay-protection).
80- // / This method does not affect the token generation behavior of the
81- // / ``tokenForcingRefresh()`` method.
82- - (void )limitedUseTokenWithCompletion:(void (^)(FIRAppCheckToken *_Nullable token,
83- NSError *_Nullable error))handler;
84-
8557// / Sets the `AppCheckProviderFactory` to use to generate
8658// / `AppCheckDebugProvider` objects.
8759// /
0 commit comments