org.eclipse.aether.util.repository

## Class ConservativeAuthenticationSelector

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

- All Implemented Interfaces:
    AuthenticationSelector

      public final class ConservativeAuthenticationSelector
      extends Object
      implements AuthenticationSelector

  An authentication selector that delegates to another selector but only if a repository has no authentication data yet. If authentication has already been assigned to a repository, that is selected.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConservativeAuthenticationSelector(AuthenticationSelector selector)` Creates a new selector that delegates to the specified selector.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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

    - #### ConservativeAuthenticationSelector

          public ConservativeAuthenticationSelector(AuthenticationSelector selector)

      Creates a new selector that delegates to the specified selector.
      Parameters:
        `selector` - The selector to delegate to in case a repository has no authentication yet, must not be `null`.

  - ### Method Detail

    - #### 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.