mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Add Client-side OAuth2 to HTTP connections
Implement client-side OAuth in non-local HTTP connections. Also add tests to verify that the different modes of connection are set up correctly. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=147636222
This commit is contained in:
parent
32b236e940
commit
177bf4a5f1
9 changed files with 303 additions and 6 deletions
|
@ -16,6 +16,7 @@ package google.registry.tools;
|
|||
|
||||
import com.beust.jcommander.Parameter;
|
||||
import com.beust.jcommander.Parameters;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.net.HostAndPort;
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
|
@ -31,7 +32,15 @@ import google.registry.config.RegistryConfig;
|
|||
class AppEngineConnectionFlags {
|
||||
|
||||
@Parameter(names = "--server", description = "HOST[:PORT] to which remote commands are sent.")
|
||||
private static HostAndPort server = RegistryConfig.getServer();
|
||||
private HostAndPort server = RegistryConfig.getServer();
|
||||
|
||||
/** Provided for testing. */
|
||||
@VisibleForTesting
|
||||
AppEngineConnectionFlags(HostAndPort server) {
|
||||
this.server = server;
|
||||
}
|
||||
|
||||
AppEngineConnectionFlags() {}
|
||||
|
||||
HostAndPort getServer() {
|
||||
return server;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue