Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions GoogleSignIn/Sources/GIDAuthentication.m
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,21 @@ @interface GTMAppAuthFetcherAuthorizationWithEMMSupport : GTMAppAuthFetcherAutho

@implementation GTMAppAuthFetcherAuthorizationWithEMMSupport

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (void)authorizeRequest:(nullable NSMutableURLRequest *)request
delegate:(id)delegate
didFinishSelector:(SEL)sel {
#pragma clang diagnostic pop
GTMAppAuthFetcherAuthorizationEMMChainedDelegate *chainedDelegate =
[[GTMAppAuthFetcherAuthorizationEMMChainedDelegate alloc] initWithDelegate:delegate
selector:sel];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[super authorizeRequest:request
delegate:chainedDelegate
didFinishSelector:@selector(authentication:request:finishedWithError:)];
#pragma clang diagnostic pop
}

- (void)authorizeRequest:(nullable NSMutableURLRequest *)request
Expand Down Expand Up @@ -206,7 +212,10 @@ - (NSString *)emmSupport {

#pragma mark - Public methods

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (id<GTMFetcherAuthorizationProtocol>)fetcherAuthorizer {
#pragma clang diagnostic pop
#if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
GTMAppAuthFetcherAuthorization *authorization = self.emmSupport ?
[[GTMAppAuthFetcherAuthorizationWithEMMSupport alloc] initWithAuthState:_authState] :
Expand Down
3 changes: 3 additions & 0 deletions GoogleSignIn/Sources/Public/GoogleSignIn/GIDAuthentication.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ typedef void (^GIDAuthenticationCompletion)(GIDAuthentication *_Nullable authent
/// Gets a new authorizer for `GTLService`, `GTMSessionFetcher`, or `GTMHTTPFetcher`.
///
/// @return A new authorizer
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (id<GTMFetcherAuthorizationProtocol>)fetcherAuthorizer;
#pragma clang diagnostic pop

/// Get a valid access token and a valid ID token, refreshing them first if they have expired or are
/// about to expire.
Expand Down
3 changes: 3 additions & 0 deletions GoogleSignIn/Tests/Unit/GIDAuthenticationTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,10 @@ - (void)testFetcherAuthorizer {
// internally, so let's just take the shortcut here by asserting we get a
// GTMAppAuthFetcherAuthorization object.
GIDAuthentication *auth = [self auth];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
id<GTMFetcherAuthorizationProtocol> fetcherAuthroizer = auth.fetcherAuthorizer;
#pragma clang diagnostic pop
XCTAssertTrue([fetcherAuthroizer isKindOfClass:[GTMAppAuthFetcherAuthorization class]]);
XCTAssertTrue([fetcherAuthroizer canAuthorize]);
}
Expand Down