• Alice Gong's avatar
    Implement OAuth2 authentication flow for Box to obtain authorization, refresh... · 21994dac
    Alice Gong authored
    Implement OAuth2 authentication flow for Box to obtain authorization, refresh token, and access token using a pop-up window, and store
    tokens into profile prefs.
    
    This is part of a series that will eventually, if enabled by
    enterprise admin, replace regular DownloadItemRenameHandler with
    FileSystemConnectorRenameHandler, which uses FileSystemConnector to
    redirect downloaded local temporary files to get uploaded through a
    series of BoxApiCallFlow steps.
    
    This CL does the following:
    
    1/ Create new profile prefs to hold the OAuth2 tokens needed for file
    system connectors. (connectors/connectors_prefs.h/cc)
    2/ Implement UX for gathering Box user consent. This is being
    implemented as pop-up window hosting the Box consent flow, much like
    the force sign in dialog hosts the Google sign in flow. (connectors/
    file_system/signin_dialog_delegate.h/cc)
    3/ Implement OAuth2 flow to mint access and refresh tokens from user
    consent’s auth_code.
    4/ Implement OAuth2 flow to mint access and refresh tokens from the
    previous refresh token. (connectors/file_system/
    box_access_token_fetcher.h/cc)
    
    BUG=1168607
    
    Change-Id: If4882440315151a7cc23f2a6f56430bdb2bc09bf
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2591667
    Commit-Queue: Alice Gong <alicego@google.com>
    Auto-Submit: Alice Gong <alicego@google.com>
    Reviewed-by: default avatarNicolas Ouellet-Payeur <nicolaso@chromium.org>
    Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
    Reviewed-by: default avatarRoger Tawa <rogerta@chromium.org>
    Reviewed-by: default avatarMarc-André Decoste <mad@chromium.org>
    Reviewed-by: default avatarDominique Fauteux-Chapleau <domfc@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#846300}
    21994dac
connectors_prefs.h 1.44 KB