Package google.registry.tools
Class AuthModule
java.lang.Object
google.registry.tools.AuthModule
Module providing the dependency graph for authorization credentials.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic @interface
Dagger qualifier forCredential
used by the Cloud SQL client in the nomulus tool. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeFlow
provideAuthorizationCodeFlow
(com.google.api.client.json.JsonFactory jsonFactory, com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets clientSecrets, com.google.common.collect.ImmutableList<String> requiredOauthScopes, com.google.api.client.util.store.AbstractDataStoreFactory dataStoreFactory) static com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets
provideClientSecrets
(String clientId, String clientSecret, com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets.Details details) static com.google.api.client.util.store.AbstractDataStoreFactory
static GoogleCredentialsBundle
provideLocalCredential
(String credentialJson, com.google.common.collect.ImmutableList<String> scopes) static String
provideLocalCredentialJson
(dagger.Lazy<com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets> clientSecrets, dagger.Lazy<com.google.api.client.auth.oauth2.Credential> credential, String credentialFilePath) static com.google.auth.oauth2.GoogleCredentials
providesLocalCredentialForCloudSqlClient
(String credentialJson, com.google.common.collect.ImmutableList<String> credentialScopes)
-
Constructor Details
-
AuthModule
public AuthModule()
-
-
Method Details
-
provideLocalCredential
@Provides @LocalCredential public static GoogleCredentialsBundle provideLocalCredential(@LocalCredentialJson String credentialJson, @Config("localCredentialOauthScopes") com.google.common.collect.ImmutableList<String> scopes) -
providesLocalCredentialForCloudSqlClient
@Provides @CloudSqlClientCredential public static com.google.auth.oauth2.GoogleCredentials providesLocalCredentialForCloudSqlClient(@LocalCredentialJson String credentialJson, @Config("localCredentialOauthScopes") com.google.common.collect.ImmutableList<String> credentialScopes) -
provideAuthorizationCodeFlow
@Provides public static com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeFlow provideAuthorizationCodeFlow(com.google.api.client.json.JsonFactory jsonFactory, com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets clientSecrets, @Config("localCredentialOauthScopes") com.google.common.collect.ImmutableList<String> requiredOauthScopes, com.google.api.client.util.store.AbstractDataStoreFactory dataStoreFactory) -
provideClientSecrets
-
provideLocalCredentialJson
@Provides @LocalCredentialJson public static String provideLocalCredentialJson(dagger.Lazy<com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets> clientSecrets, @StoredCredential dagger.Lazy<com.google.api.client.auth.oauth2.Credential> credential, @Nullable @Config("credentialFilePath") String credentialFilePath) -
provideDataStoreFactory
@Provides @Singleton public static com.google.api.client.util.store.AbstractDataStoreFactory provideDataStoreFactory()
-