☂ Provide IdentityManager APIs to manage signin |
||||||||||||||||||||||||||||||
Issue descriptionSigning-in is a multi step process and there are many related methods. The methods involved are: - SigninManager::StartSignInWithRefreshToken() - SigninManager::CopyCredentialsFrom() - SigninManager::MergeSigninCredentialInCookieJar() - SigninManager::CompletePendingSignin() - SigninManager::OnExternalSigninCompleted() - SigninManager::AuthInProgress() - SigninManager::GetAccountIdForAuthInProgress() - SigninManager::GetGaiaIdForAuthInProgress() - SigninManager::GetUsernameForAuthInProgress() Given the number of methods, and the fact that they are not available on one platform (ChromeOS), it may be worth moving them to a separate object (name to be decided, name in progress IdentityMutator). It is probably worth moving the methods related to signing out to that object too, i.e. IdentityManager::SignOut().
,
Oct 1
,
Oct 1
,
Oct 1
,
Oct 1
,
Oct 1
,
Oct 1
,
Oct 1
,
Oct 1
,
Oct 1
,
Oct 1
,
Oct 3
,
Oct 8
@sdefresne: Are you planning to work on this one yourself anytime soon? Seems to be blocking quite a few other tasks, and I was wondering whether it would make sense for me to work on this one, or if you'd rather do it yourself (and the lack of a Proj-Servicification-VendorBug tag makes me think of the later).
,
Oct 8
I am currently working on a design for refactoring those APIs. I understand that this is blocking many migration bugs, and thus it is one of my highest priority bug.
,
Oct 8
,
Oct 9
> I am currently working on a design for refactoring those APIs. I understand that this is blocking many migration bugs, and thus it is one of my highest priority bug. Thanks @sdefresne for the heads-up. Looking forward to the new APIs!
,
Oct 12
The plan is detailed in the following doc: https://docs.google.com/document/d/1YVx-SW0VbrAnek69PVxQ1ie71VewcuKvf8JvIzFfuRQ/edit?ts=5bbf5648#heading=h.ipadtjj8bkuv TL;DR: a new PrimaryAccountMutator interface will be developed. That new class will expose all methods to mutate the primary account. An instance will be available via IdentityManager::GetPrimaryAccountMutator(). That method may return null (on Chrome OS) so the return value need to be DCHECK-ed. This will remove the need for casting from SigninManagerBase* to SigninManager*. I will now work on adding this interface.
,
Oct 18
,
Oct 18
,
Oct 24
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/079b419e93080e7088aab44deec145de7461fe93 commit 079b419e93080e7088aab44deec145de7461fe93 Author: Sylvain Defresne <sdefresne@chromium.org> Date: Wed Oct 24 21:42:25 2018 Introduce PrimaryAccountMutator. PrimaryAccountMutator is a new API that wraps the method related to the mutation of the signed-in state of the primary account. It will become the recommended API to set and clear the primary account when migrating to the Identity Service API. The PrimaryAccountMutatorImpl methods are not implemented yet. They will be implemented in follow up CLs (and corresponding tests added). This is done to limit the size of the CLs. Design document is available at: https://docs.google.com/document/d/1YVx-SW0VbrAnek69PVxQ1ie71VewcuKvf8JvIzFfuRQ/view Bug: 889902 Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs Change-Id: I2acd1ebdccadfebb855e55f4e9b78c148557ed85 Reviewed-on: https://chromium-review.googlesource.com/c/1286852 Reviewed-by: Mihai Sardarescu <msarda@chromium.org> Reviewed-by: Colin Blundell <blundell@chromium.org> Commit-Queue: Sylvain Defresne <sdefresne@chromium.org> Cr-Commit-Position: refs/heads/master@{#602467} [modify] https://crrev.com/079b419e93080e7088aab44deec145de7461fe93/chrome/browser/signin/identity_manager_factory.cc [modify] https://crrev.com/079b419e93080e7088aab44deec145de7461fe93/ios/chrome/browser/signin/identity_manager_factory.cc [modify] https://crrev.com/079b419e93080e7088aab44deec145de7461fe93/ios/web_view/internal/signin/web_view_identity_manager_factory.mm [modify] https://crrev.com/079b419e93080e7088aab44deec145de7461fe93/services/identity/public/cpp/BUILD.gn [modify] https://crrev.com/079b419e93080e7088aab44deec145de7461fe93/services/identity/public/cpp/identity_manager.cc [modify] https://crrev.com/079b419e93080e7088aab44deec145de7461fe93/services/identity/public/cpp/identity_manager.h [modify] https://crrev.com/079b419e93080e7088aab44deec145de7461fe93/services/identity/public/cpp/identity_manager_unittest.cc [modify] https://crrev.com/079b419e93080e7088aab44deec145de7461fe93/services/identity/public/cpp/identity_test_environment.cc [add] https://crrev.com/079b419e93080e7088aab44deec145de7461fe93/services/identity/public/cpp/primary_account_mutator.h [add] https://crrev.com/079b419e93080e7088aab44deec145de7461fe93/services/identity/public/cpp/primary_account_mutator_impl.cc [add] https://crrev.com/079b419e93080e7088aab44deec145de7461fe93/services/identity/public/cpp/primary_account_mutator_impl.h
,
Nov 5
@sdefresne sorry to insist a bit on this issue, but I was wondering if you might have any update on the implementation of the PrimaryAccountMutator, since I'm reaching a point where I could use implementations for whatever will map to SigninManager::MergeSigninCredentialInCookieJar() and SigninManager::AuthInProgress(). Thanks!
,
Nov 6
,
Nov 6
,
Nov 6
,
Nov 6
,
Nov 9
,
Nov 9
,
Nov 9
,
Nov 13
,
Nov 13
Sorry, I was out of the office since Nov 1st and just came back. I'll work on adding implementation for the method as soon as possible.
,
Nov 15
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/582d3964d03bdd1ab54f5ce02adc6adfb7053b9e commit 582d3964d03bdd1ab54f5ce02adc6adfb7053b9e Author: Sylvain Defresne <sdefresne@chromium.org> Date: Thu Nov 15 16:22:27 2018 Add implementation for PrimaryAccountMutatorImpl [1/N] Add implementation and test for PrimaryAccountMutatorImpl methods {Set,Is}SettingPrimaryAccountAllowed. Bug: 889902, 806778 Change-Id: Ibd75f2b3a988b4c403eab3b682a157e31e4b2e18 Reviewed-on: https://chromium-review.googlesource.com/c/1335937 Reviewed-by: Colin Blundell <blundell@chromium.org> Reviewed-by: Mihai Sardarescu <msarda@chromium.org> Commit-Queue: Sylvain Defresne <sdefresne@chromium.org> Cr-Commit-Position: refs/heads/master@{#608390} [modify] https://crrev.com/582d3964d03bdd1ab54f5ce02adc6adfb7053b9e/components/signin/core/browser/signin_manager.cc [modify] https://crrev.com/582d3964d03bdd1ab54f5ce02adc6adfb7053b9e/components/signin/core/browser/signin_manager.h [modify] https://crrev.com/582d3964d03bdd1ab54f5ce02adc6adfb7053b9e/components/signin/core/browser/signin_manager_base.h [modify] https://crrev.com/582d3964d03bdd1ab54f5ce02adc6adfb7053b9e/services/identity/BUILD.gn [modify] https://crrev.com/582d3964d03bdd1ab54f5ce02adc6adfb7053b9e/services/identity/public/cpp/BUILD.gn [modify] https://crrev.com/582d3964d03bdd1ab54f5ce02adc6adfb7053b9e/services/identity/public/cpp/primary_account_mutator_impl.cc [add] https://crrev.com/582d3964d03bdd1ab54f5ce02adc6adfb7053b9e/services/identity/public/cpp/primary_account_mutator_unittest.cc
,
Nov 16
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7b32e1d79f6e38b8824c3cd47f768632680251ce commit 7b32e1d79f6e38b8824c3cd47f768632680251ce Author: Sylvain Defresne <sdefresne@chromium.org> Date: Fri Nov 16 12:03:51 2018 Add implementation for PrimaryAccountMutatorImpl [2/N] Add implementation and test for PrimaryAccountMutatorImpl method SetPrimaryAccount. The method is the new API that will replace SigninManager::OnExternalSigninCompleted(). Bug: 889902, 806778 Change-Id: I0ece2927c24506644a1087a7ed10df4578d592e3 Reviewed-on: https://chromium-review.googlesource.com/c/1335601 Commit-Queue: Sylvain Defresne <sdefresne@chromium.org> Reviewed-by: Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/master@{#608735} [modify] https://crrev.com/7b32e1d79f6e38b8824c3cd47f768632680251ce/services/identity/public/cpp/primary_account_mutator.h [modify] https://crrev.com/7b32e1d79f6e38b8824c3cd47f768632680251ce/services/identity/public/cpp/primary_account_mutator_impl.cc [modify] https://crrev.com/7b32e1d79f6e38b8824c3cd47f768632680251ce/services/identity/public/cpp/primary_account_mutator_unittest.cc
,
Nov 16
,
Nov 16
,
Nov 16
,
Nov 16
,
Nov 16
,
Nov 16
,
Nov 16
,
Dec 17
|
||||||||||||||||||||||||||||||
►
Sign in to add a comment |
||||||||||||||||||||||||||||||
Comment 1 by sdefresne@chromium.org
, Oct 1