GIDFakeAuthorizationFlowProcessor.m 957 B

12345678910111213141516171819202122232425262728293031
  1. #import "GoogleSignIn/Sources/GIDAuthorizationFlowProcessor/Implementations/Fakes/GIDFakeAuthorizationFlowProcessor.h"
  2. @implementation GIDFakeAuthorizationFlowProcessor
  3. - (void)startWithOptions:(GIDSignInInternalOptions *)options
  4. emmSupport:(nullable NSString *)emmSupport
  5. completion:(void (^)(OIDAuthorizationResponse *_Nullable authorizationResponse,
  6. NSError *_Nullable error))completion {
  7. NSAssert(self.testBlock != nil, @"Set the test block before invoking this method.");
  8. self.testBlock(^(OIDAuthorizationResponse *authorizationResponse, NSError *error) {
  9. completion(authorizationResponse, error);
  10. });
  11. }
  12. - (BOOL)isStarted {
  13. NSAssert(NO, @"Not implemented.");
  14. return YES;
  15. }
  16. - (BOOL)resumeExternalUserAgentFlowWithURL:(NSURL *)url {
  17. NSAssert(NO, @"Not implemented.");
  18. return YES;
  19. }
  20. - (void)cancelAuthenticationFlow {
  21. NSAssert(NO, @"Not implemented.");
  22. }
  23. @end