api / org.gradle.api.credentials / PasswordCredentials

PasswordCredentials

interface PasswordCredentials : Credentials

A username/password credentials that can be used to login to something protected by a username and password.

Since
3.5

Functions

getPassword

abstract fun getPassword(): String

Returns the password to use when authenticating.

getUsername

abstract fun getUsername(): String

Returns the user name to use when authenticating.

setPassword

abstract fun setPassword(password: String): Unit

Sets the password to use when authenticating.

setUsername

abstract fun setUsername(userName: String): Unit

Sets the user name to use when authenticating.

Inheritors

HttpBuildCacheCredentials

open class HttpBuildCacheCredentials : PasswordCredentials

Password credentials for a HTTP build cache backend.

PasswordCredentials

interface PasswordCredentials : PasswordCredentials

A username/password credentials that can be used to login to password-protected remote repository.