Commit c3b3eb5e authored by Javier Ernesto Flores Robles's avatar Javier Ernesto Flores Robles Committed by Commit Bot

[iOS][Credential-Provider] Require auth to init password list.

Bug: 1045454
Change-Id: I44d39828843e817e82f20afe4abc1558b92a1e41
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2134252
Commit-Queue: Javier Ernesto Flores Robles <javierrobles@chromium.org>
Commit-Queue: David Jean <djean@chromium.org>
Auto-Submit: Javier Ernesto Flores Robles <javierrobles@chromium.org>
Reviewed-by: default avatarDavid Jean <djean@chromium.org>
Cr-Commit-Position: refs/heads/master@{#756198}
parent 92b0a074
......@@ -33,26 +33,23 @@
- (void)prepareCredentialListForServiceIdentifiers:
(NSArray<ASCredentialServiceIdentifier*>*)serviceIdentifiers {
self.listCoordinator = [[CredentialListCoordinator alloc]
initWithBaseViewController:self
context:self.extensionContext
serviceIdentifiers:serviceIdentifiers];
[self.listCoordinator start];
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
// TODO(crbug.com/1045455): Remove, this is for testing purpose only.
[self reauthenticateIfNeededWithCompletionHandler:^(
ReauthenticationResult result) {
// TODO(crbug.com/1045455): Check result before cancelling.
[self.extensionContext
cancelRequestWithError:
[[NSError alloc]
initWithDomain:ASExtensionErrorDomain
code:ASExtensionErrorCode::ASExtensionErrorCodeFailed
userInfo:nil]];
if (result != ReauthenticationResult::kFailure) {
self.listCoordinator = [[CredentialListCoordinator alloc]
initWithBaseViewController:self
context:self.extensionContext
serviceIdentifiers:serviceIdentifiers];
[self.listCoordinator start];
} else {
[self.extensionContext
cancelRequestWithError:
[[NSError alloc] initWithDomain:ASExtensionErrorDomain
code:ASExtensionErrorCode::
ASExtensionErrorCodeFailed
userInfo:nil]];
}
}];
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment