AuthenticationSupported

API Documentation:AuthenticationSupported

An artifact repository which supports username/password authentication.

Properties

PropertyDescription
credentials
Incubating

The credentials of the specified type used to authenticate with this repository.

Methods

MethodDescription
credentials(credentialsType, action)
Incubating

Configures the credentials for this repository using the supplied action.

credentials(action)

Configures the username and password credentials for this repository using the supplied action.

Script blocks

No script blocks

Property details

T credentials (read-only)

Note: This property is incubating and may change in a future version of Gradle.

The credentials of the specified type used to authenticate with this repository.

If no credentials have been assigned to this repository, an empty set of credentials of the specified type is assigned to this repository and returned.

Method details

void credentials(Class<T> credentialsType, Action<? super T> action)

Note: This method is incubating and may change in a future version of Gradle.

Configures the credentials for this repository using the supplied action.

If no credentials have been assigned to this repository, an empty set of credentials of the specified type will be assigned to this repository and given to the configuration action. If credentials have already been specified for this repository, they will be passed to the given configuration action.

repositories {
    maven {
        url "${url}"
        credentials(AwsCredentials) {
            accessKey "myAccessKey"
            secretKey "mySecret"
        }
    }
}

The following credential types are currently supported for the credentialsType argument:

void credentials(Action<? super PasswordCredentials> action)

Configures the username and password credentials for this repository using the supplied action.

If no credentials have been assigned to this repository, an empty set of username and password credentials is assigned to this repository and passed to the action.

repositories {
    maven {
        url "${url}"
        credentials {
            username = 'joe'
            password = 'secret'
        }
    }
}