List of usage examples for com.google.api.client.googleapis.auth.oauth2 GoogleOAuthConstants AUTHORIZATION_SERVER_URL
String AUTHORIZATION_SERVER_URL
To view the source code for com.google.api.client.googleapis.auth.oauth2 GoogleOAuthConstants AUTHORIZATION_SERVER_URL.
Click Source Link
From source file:ch.cyberduck.core.googledrive.DriveSession.java
License:Open Source License
@Override protected Drive connect(final HostKeyCallback callback) throws BackgroundException { this.transport = new ApacheHttpTransport(builder.build(this).build()); this.authorizationService = new OAuth2AuthorizationService(transport, GoogleOAuthConstants.TOKEN_SERVER_URL, GoogleOAuthConstants.AUTHORIZATION_SERVER_URL, preferences.getProperty("google.drive.client.id"), preferences.getProperty("google.drive.client.secret"), Collections.singletonList(DriveScopes.DRIVE)) .withLegacyPrefix(host.getProtocol().getDescription()); return new Drive.Builder(transport, json, new HttpRequestInitializer() { @Override//from w w w. j a v a2s.c o m public void initialize(HttpRequest request) throws IOException { request.setSuppressUserAgentSuffix(true); // Add bearer token to request credential.initialize(request); } }).setApplicationName(useragent.get()).build(); }
From source file:com.google.cloud.dataflow.sdk.options.GcpOptions.java
License:Apache License
/** * The authorization server URL to use for OAuth 2 authentication. Normally, the default is * sufficient, but some specialized use cases may want to override this value. *//*w w w. ja v a2 s.c o m*/ @Description("The authorization server URL to use for OAuth 2 authentication. Normally, the " + "default is sufficient, but some specialized use cases may want to override this value.") @Default.String(GoogleOAuthConstants.AUTHORIZATION_SERVER_URL) @Hidden String getAuthorizationServerEncodedUrl();