org.eclipse.aether.util.repository

## Class DefaultAuthenticationSelector

- java.lang.Object
- - org.eclipse.aether.util.repository.DefaultAuthenticationSelector

- All Implemented Interfaces:
    AuthenticationSelector

      public final class DefaultAuthenticationSelector
      extends Object
      implements AuthenticationSelector

  A simple authentication selector that selects authentication based on repository identifiers.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultAuthenticationSelector()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `DefaultAuthenticationSelector` | `add(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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultAuthenticationSelector

          public DefaultAuthenticationSelector()

  - ### Method Detail

    - #### add

          public DefaultAuthenticationSelector add(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 be `null`.
        `auth` - The authentication to add, may be `null`.
      Returns:
        This selector for chaining, never `null`.

    - #### getAuthentication

          public Authentication getAuthentication(RemoteRepository repository)

      Description copied from interface: `AuthenticationSelector`
      Selects authentication for the specified remote repository.
      Specified by:
        `getAuthentication` in interface `AuthenticationSelector`
      Parameters:
        `repository` - The repository for which to select authentication, must not be `null`.
      Returns:
        The selected authentication or `null` if none.

Copyright © 2010-2013 The Eclipse Foundation. All Rights Reserved.