This is designed to simplify the flow in which an end-user authorizes the application to access their protected data, and then the application has access to their data based on an access token and a refresh token to refresh that access token when it expires.
The first step is to call {@link #loadCredential(String)} based on the known user ID to check ifthe end-user's credentials are already known. If not, call {@link #newAuthorizationUrl()} anddirect the end-user's browser to an authorization page. The web browser will then redirect to the redirect URL with a {@code "code"} query parameter which can then be used to request an accesstoken using {@link #newTokenRequest(String)}. Finally, use {@link #createAndStoreCredential(TokenResponse,String)} to store and obtain a credential foraccessing protected resources.
@since 1.7 @author Yaniv Inbar
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|