Package com.konfigyr.gradle
Class RegistrySpec.ClientCredentialsSpec
java.lang.Object
com.konfigyr.gradle.RegistrySpec.ClientCredentialsSpec
- Enclosing class:
RegistrySpec
Configures
ClientCredentials, used for the OAuth2 client_credentials grant, as
defined by RFC 6749, Section 4.4.- Since:
- 1.2.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionClientCredentialsSpec(org.gradle.api.model.ObjectFactory factory, org.gradle.api.provider.ProviderFactory providers, boolean useEnvironmentConventions) Creates a newRegistrySpec.ClientCredentialsSpec, instantiated by Gradle whenRegistrySpec.clientCredentials(Action)is first called for a given registry. -
Method Summary
Modifier and TypeMethodDescriptionorg.gradle.api.provider.Property<String> Specify the OAuthclient_idthat is used to get the OAuth access token.org.gradle.api.provider.Property<String> Specify the OAuthclient_secretthat is used to get the OAuth access token.booleanWhether this grant falls back to Konfigyr's well-known environment variables (KONFIGYR_CLIENT_ID/KONFIGYR_CLIENT_SECRET) when a property is left unset - true only for the reserved "konfigyrCentral" registry, every other registry must set every property explicitly.
-
Constructor Details
-
ClientCredentialsSpec
@Inject public ClientCredentialsSpec(org.gradle.api.model.ObjectFactory factory, org.gradle.api.provider.ProviderFactory providers, boolean useEnvironmentConventions) Creates a newRegistrySpec.ClientCredentialsSpec, instantiated by Gradle whenRegistrySpec.clientCredentials(Action)is first called for a given registry.- Parameters:
factory- the Gradle object factory, cannot be null.providers- the Gradle provider factory, used to resolve environment variable conventions, cannot be null.useEnvironmentConventions- true only for the reserved "konfigyrCentral" registry, enabling its environment variable fallbacks.
-
-
Method Details
-
getClientId
Specify the OAuthclient_idthat is used to get the OAuth access token. For the reservedkonfigyrCentralregistry, this value can be specified by theKONFIGYR_CLIENT_IDenvironment variable - every other registry requires it to be set explicitly. -
getClientSecret
Specify the OAuthclient_secretthat is used to get the OAuth access token. For the reservedkonfigyrCentralregistry, this value can be specified by theKONFIGYR_CLIENT_SECRETenvironment variable - every other registry requires it to be set explicitly. -
isUseEnvironmentConventions
public boolean isUseEnvironmentConventions()Whether this grant falls back to Konfigyr's well-known environment variables (KONFIGYR_CLIENT_ID/KONFIGYR_CLIENT_SECRET) when a property is left unset - true only for the reserved "konfigyrCentral" registry, every other registry must set every property explicitly.
-