|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.api.client.auth.oauth2.AuthorizationCodeFlow.Builder
com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeFlow.Builder
public static class GoogleAuthorizationCodeFlow.Builder
Google authorization code flow builder.
Implementation is not thread-safe.
Constructor Summary | |
---|---|
GoogleAuthorizationCodeFlow.Builder(HttpTransport transport,
JsonFactory jsonFactory,
GoogleClientSecrets clientSecrets,
Iterable<String> scopes)
|
|
GoogleAuthorizationCodeFlow.Builder(HttpTransport transport,
JsonFactory jsonFactory,
String clientId,
String clientSecret,
Iterable<String> scopes)
|
Method Summary | |
---|---|
GoogleAuthorizationCodeFlow |
build()
|
String |
getAccessType()
Returns the access type ( "online" to request online access or "offline" to
request offline access) or null for the default behavior of "online" . |
String |
getApprovalPrompt()
Returns the approval prompt behavior ( "auto" to request auto-approval or
"force" to force the approval UI to show) or null for the default behavior of
"auto" . |
GoogleAuthorizationCodeFlow.Builder |
setAccessType(String accessType)
Sets the access type ( "online" to request online access or "offline" to
request offline access) or null for the default behavior of "online" . |
GoogleAuthorizationCodeFlow.Builder |
setApprovalPrompt(String approvalPrompt)
Sets the approval prompt behavior ( "auto" to request auto-approval or "force"
to force the approval UI to show) or null for the default behavior of "auto" . |
GoogleAuthorizationCodeFlow.Builder |
setCredentialStore(CredentialStore credentialStore)
|
GoogleAuthorizationCodeFlow.Builder |
setRequestInitializer(HttpRequestInitializer requestInitializer)
|
GoogleAuthorizationCodeFlow.Builder |
setScopes(Iterable<String> scopes)
|
GoogleAuthorizationCodeFlow.Builder |
setScopes(String... scopes)
|
Methods inherited from class com.google.api.client.auth.oauth2.AuthorizationCodeFlow.Builder |
---|
getAuthorizationServerEncodedUrl, getClientAuthentication, getClientId, getClock, getCredentialStore, getJsonFactory, getMethod, getRequestInitializer, getScopes, getTokenServerUrl, getTransport, setClock |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GoogleAuthorizationCodeFlow.Builder(HttpTransport transport, JsonFactory jsonFactory, String clientId, String clientSecret, Iterable<String> scopes)
transport
- HTTP transportjsonFactory
- JSON factoryclientId
- client identifierclientSecret
- client secretscopes
- list of scopes to be joined by a space separator (or a single value containing
multiple space-separated scopes)public GoogleAuthorizationCodeFlow.Builder(HttpTransport transport, JsonFactory jsonFactory, GoogleClientSecrets clientSecrets, Iterable<String> scopes)
transport
- HTTP transportjsonFactory
- JSON factoryclientSecrets
- Google client secretsscopes
- list of scopes to be joined by a space separator (or a single value containing
multiple space-separated scopes)Method Detail |
---|
public GoogleAuthorizationCodeFlow build()
build
in class AuthorizationCodeFlow.Builder
public GoogleAuthorizationCodeFlow.Builder setCredentialStore(CredentialStore credentialStore)
setCredentialStore
in class AuthorizationCodeFlow.Builder
public GoogleAuthorizationCodeFlow.Builder setRequestInitializer(HttpRequestInitializer requestInitializer)
setRequestInitializer
in class AuthorizationCodeFlow.Builder
public GoogleAuthorizationCodeFlow.Builder setScopes(Iterable<String> scopes)
setScopes
in class AuthorizationCodeFlow.Builder
public GoogleAuthorizationCodeFlow.Builder setScopes(String... scopes)
setScopes
in class AuthorizationCodeFlow.Builder
public GoogleAuthorizationCodeFlow.Builder setApprovalPrompt(String approvalPrompt)
"auto"
to request auto-approval or "force"
to force the approval UI to show) or null
for the default behavior of "auto"
.
By default this has the value null
.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Upgrade warning: prior to version 1.10 the default was "force"
. However, starting
with version 1.10 it is null
, which means "auto"
for web applications. To
keep the prior behavior, you need to explicitly call setApprovalPrompt("force")
.
public final String getApprovalPrompt()
"auto"
to request auto-approval or
"force"
to force the approval UI to show) or null
for the default behavior of
"auto"
.
public GoogleAuthorizationCodeFlow.Builder setAccessType(String accessType)
"online"
to request online access or "offline"
to
request offline access) or null
for the default behavior of "online"
.
By default this has the value null
.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
Upgrade warning: prior to version 1.10 the default was "offline"
. However, starting
with version 1.10 it is null
, which means "online"
for web applications. To
keep the prior behavior, you need to explicitly call setAccessType("offline")
.
public final String getAccessType()
"online"
to request online access or "offline"
to
request offline access) or null
for the default behavior of "online"
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |