Class DefaultAuthenticationSelector
- java.lang.Object
-
- org.eclipse.aether.util.repository.DefaultAuthenticationSelector
-
- All Implemented Interfaces:
AuthenticationSelector
public final class DefaultAuthenticationSelector extends java.lang.Object implements AuthenticationSelector
A simple authentication selector that selects authentication based on repository identifiers.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,Authentication>repos
-
Constructor Summary
Constructors Constructor Description DefaultAuthenticationSelector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultAuthenticationSelectoradd(java.lang.String id, Authentication auth)Adds the specified authentication info for the given repository identifier.AuthenticationgetAuthentication(RemoteRepository repository)Selects authentication for the specified remote repository.
-
-
-
Field Detail
-
repos
private final java.util.Map<java.lang.String,Authentication> repos
-
-
Method Detail
-
add
public DefaultAuthenticationSelector add(java.lang.String id, Authentication auth)
Adds the specified authentication info for the given repository identifier.- Parameters:
id- The identifier of the repository to add the authentication for, must not benull.auth- The authentication to add, may benull.- Returns:
- This selector for chaining, never
null.
-
getAuthentication
public Authentication getAuthentication(RemoteRepository repository)
Description copied from interface:AuthenticationSelectorSelects authentication for the specified remote repository.- Specified by:
getAuthenticationin interfaceAuthenticationSelector- Parameters:
repository- The repository for which to select authentication, must not benull.- Returns:
- The selected authentication or
nullif none.
-
-