mirror of
https://github.com/google/nomulus
synced 2026-01-11 00:10:36 +00:00
Configure client id and client secret in the config file
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=224158599
This commit is contained in:
@@ -1258,15 +1258,18 @@ public final class RegistryConfig {
|
||||
return "/tos";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the OAuth2 client secrets file.
|
||||
*
|
||||
* <p>This is the name of a resource relative to the root of the class tree.
|
||||
*/
|
||||
/** OAuth client ID used by the nomulus tool. */
|
||||
@Provides
|
||||
@Config("clientSecretFilename")
|
||||
public static String provideClientSecretFilename(RegistryConfigSettings config) {
|
||||
return config.registryTool.clientSecretFilename;
|
||||
@Config("toolsClientId")
|
||||
public static String provideToolsClientId(RegistryConfigSettings config) {
|
||||
return config.registryTool.clientId;
|
||||
}
|
||||
|
||||
/** OAuth client secret used by the nomulus tool. */
|
||||
@Provides
|
||||
@Config("toolsClientSecret")
|
||||
public static String provideToolsClientSecret(RegistryConfigSettings config) {
|
||||
return config.registryTool.clientSecret;
|
||||
}
|
||||
|
||||
@Provides
|
||||
@@ -1551,12 +1554,6 @@ public final class RegistryConfig {
|
||||
return Duration.standardDays(CONFIG_SETTINGS.get().registryPolicy.contactAutomaticTransferDays);
|
||||
}
|
||||
|
||||
/** Provided for testing. */
|
||||
@VisibleForTesting
|
||||
public static String getClientSecretFilename() {
|
||||
return CONFIG_SETTINGS.get().registryTool.clientSecretFilename;
|
||||
}
|
||||
|
||||
/**
|
||||
* Memoizes loading of the {@link RegistryConfigSettings} POJO.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user