public final class DefaultAuthenticationSelector extends java.lang.Object implements AuthenticationSelector
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,Authentication> |
repos |
Constructor and Description |
---|
DefaultAuthenticationSelector() |
Modifier and Type | Method and Description |
---|---|
DefaultAuthenticationSelector |
add(java.lang.String id,
Authentication auth)
Adds the specified authentication info for the given repository identifier.
|
Authentication |
getAuthentication(RemoteRepository repository)
Selects authentication for the specified remote repository.
|
private final java.util.Map<java.lang.String,Authentication> repos
public DefaultAuthenticationSelector add(java.lang.String id, Authentication auth)
id
- The identifier of the repository to add the authentication for, must not be null
.auth
- The authentication to add, may be null
.null
.public Authentication getAuthentication(RemoteRepository repository)
AuthenticationSelector
getAuthentication
in interface AuthenticationSelector
repository
- The repository for which to select authentication, must not be null
.null
if none.