DescriptionImplemented sending Device ID to LSO in "oauth2/token".
The only place where Device ID is stored on Chrome OS is the local state from now on.
Order of events:
1) User logs in. There are two options:
a) User athenticated through GAIA. We read known user device ID from local state if it exists or generate a new one if it doesn't. Then we save the device ID in a user context.
b) Otherwise, we don't store device ID in user context.
2) If it is GAIA_WITHOUT_SAML-mode, we send device ID to LSO in "oauth2/token" request (OAuth2TokenInitializer class). If it is not, we'll send it in "o/oauth2/programmatic_auth" request on step (5).
3) After NotifyUserLoggedIn() call, we store the device ID from the user context (if it is set) to local state. Then we start to create/load a profile for the user.
4) In constructor of ChromeSinginClient we migrate device id from kGoogleServicesSigninScopedDeviceId pref to the local state, if a value in the local state is empty.
5) We request tokens with "o/oauth2/programmatic_auth" if we haven't done that on step (2). Old code for sending device ID works here, because it relies on ChromeSigninClient which returns device ID set on step (4).
BUG=486044, 486136
Committed: https://crrev.com/a912deca5f760681835e4247225c1c83b656d0b5
Cr-Commit-Position: refs/heads/master@{#330207}
Patch Set 1 #Patch Set 2 : Final version. #
Total comments: 30
Patch Set 3 : Comments addressed. #
Total comments: 8
Patch Set 4 : Pavel's comments addressed. #Patch Set 5 : Xiyuan comments. #
Total comments: 4
Patch Set 6 : Added comment. #Messages
Total messages: 39 (13 generated)
|