mirror of
https://github.com/google/nomulus.git
synced 2025-05-12 22:38:16 +02: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:
parent
6352b8a01a
commit
5f9aad90fc
10 changed files with 41 additions and 82 deletions
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue