Class RegistrySpec.ClientCredentialsSpec

java.lang.Object
com.konfigyr.gradle.RegistrySpec.ClientCredentialsSpec
Enclosing class:
RegistrySpec

@NullMarked public static class RegistrySpec.ClientCredentialsSpec extends Object
Configures ClientCredentials, used for the OAuth2 client_credentials grant, as defined by RFC 6749, Section 4.4.
Since:
1.2.0
See Also:
  • Constructor Details

    • ClientCredentialsSpec

      @Inject public ClientCredentialsSpec(org.gradle.api.model.ObjectFactory factory, org.gradle.api.provider.ProviderFactory providers, boolean useEnvironmentConventions)
      Creates a new RegistrySpec.ClientCredentialsSpec, instantiated by Gradle when RegistrySpec.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

      public org.gradle.api.provider.Property<String> getClientId()
      Specify the OAuth client_id that is used to get the OAuth access token. For the reserved konfigyrCentral registry, this value can be specified by the KONFIGYR_CLIENT_ID environment variable - every other registry requires it to be set explicitly.
    • getClientSecret

      public org.gradle.api.provider.Property<String> getClientSecret()
      Specify the OAuth client_secret that is used to get the OAuth access token. For the reserved konfigyrCentral registry, this value can be specified by the KONFIGYR_CLIENT_SECRET environment 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.