Builder for AuthorizationRequest.
|
Builder()
|
| AuthorizationRequest |
build()
Builds the
AuthorizationRequest.
|
| AuthorizationRequest.Builder | |
| AuthorizationRequest.Builder | |
| AuthorizationRequest.Builder |
requestOfflineAccess(String
serverClientId, boolean forceCodeForRefreshToken)
Specifies that offline access is requested.
|
| AuthorizationRequest.Builder | |
| AuthorizationRequest.Builder |
setRequestedScopes(List<Scope>
requestedScopes)
Sets the list of OAuth 2.0 scopes that the application is requesting.
|
Builds the
AuthorizationRequest.
Specifies a hosted domain restriction.
By setting this, authorization will be restricted to accounts of the user in the specified domain.
| hostedDomain | domain of the user to restrict (for example, "mycollege.edu"), |
|---|
Specifies that offline access is requested. When offline access is requested, an authorization code is returned so the server can use the authorization code to exchange for a refresh token. The refresh token allows the server to access Google data when the user is not actively using the app.
| serverClientId | The client ID of the server that will need the authorization code. |
|---|
Specifies that offline access is requested. When offline access is requested, an authorization code is returned so the server can use the authorization code to exchange for a refresh token. The refresh token allows the server to access Google data when the user is not actively using the app.
| serverClientId | The client ID of the server that will need the authorization code. |
|---|---|
| forceCodeForRefreshToken | If true, the granted code can be exchanged for an access token and a refresh token. The first time you retrieve a code, a refresh token will be granted automatically. Subsequent requests will require additional user consent. Use false by default; only use true if your server has suffered some failure and lost the user's refresh token. |
Specifies an account on the device that should be used.
| account | The account on the device that should be used for authorization. |
|---|
Sets the list of OAuth 2.0 scopes that the application is requesting.