• Alex Ilin's avatar
    [identity] Use correct account in the remote consent flow · 4158a53f
    Alex Ilin authored
    At the end of the remote consent flow, the browser makes the second
    issueToken request. This request must use a login token of an account
    that the user has chosen in the consent UI. Gaia returns an id of this
    account in a consent result.
    
    This CL updates IdentityGetAuthTokenFunction to use the id returned in a
    consent result instead of the one that was originally chosen by Chrome.
    
    This CL also moves IdentityTokenCacheValue to use static factory methods
    instead of multiple constructor overloads. This makes obvious what type
    of a cache value is created instead of relying on argument types.
    
    Bug: 1026237
    Change-Id: I59d5eefa7bbca91b59bb3d8cd69deca600580150
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2095302
    Commit-Queue: Alex Ilin <alexilin@chromium.org>
    Reviewed-by: default avatarDavid Roger <droger@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#748742}
    4158a53f
identity_apitest.cc 99.6 KB