Package: org.gradle.api.artifacts.repositories

## [Java] Interface AuthenticationSupported

- An artifact repository which supports username/password authentication.

- - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `credentials(Closure closure)` Configure the credentials for this repository using the supplied Closure.
    `void` | `credentials(Action<? super PasswordCredentials> action)` Configure the credentials for this repository using the supplied action.
    `PasswordCredentials` | `getCredentials()` Returns the credentials used to authenticate to this repository.

- - ### Method Detail

    - #### public void credentials(Closure closure)

      Configure the credentials for this repository using the supplied Closure.

           repositories {
               maven {
                   credentials {
                       username = 'joe'
                       password = 'secret'
                   }
               }
           }

    - #### public void credentials(Action<? super PasswordCredentials> action)

      Configure the credentials for this repository using the supplied action.

           repositories {
               maven {
                   credentials {
                       username = 'joe'
                       password = 'secret'
                   }
               }
           }

    - #### public PasswordCredentials getCredentials()

      Returns the credentials used to authenticate to this repository.

      Returns:
        The credentials