@Test public void testForRepository() { RepositorySystemSession session = newSession(); RemoteRepository repo = newRepo( newAuth(), newProxy( newAuth() ) ); AuthenticationContext context = AuthenticationContext.forRepository( session, repo ); assertNotNull( context ); assertSame( session, context.getSession() ); assertSame( repo, context.getRepository() ); assertNull( context.getProxy() ); assertEquals( "value", context.get( "key" ) ); assertEquals( "value", context.get( "key" ) ); }
public static AuthenticationContext forRepository( RepositorySystemSession session, RemoteRepository repository ) { return newInstance( session, repository, null, repository.getAuthentication() ); }
AuthenticationContext implements Closeable { public static AuthenticationContext forRepository( RepositorySystemSession session, RemoteRepository repository ) { return newInstance( session, repository, null, repository.getAuthentication() ); } }
AuthenticationContext implements Closeable { public static AuthenticationContext forRepository( RepositorySystemSession session, RemoteRepository repository ) { return newInstance( session, repository, null, repository.getAuthentication() ); } private  AuthenticationContext( RepositorySystemSession session, RemoteRepository repository, Proxy proxy,
                                   Authentication auth ); }
AuthenticationContext implements Closeable { public static AuthenticationContext forRepository( RepositorySystemSession session, RemoteRepository repository ) { return newInstance( session, repository, null, repository.getAuthentication() ); } private  AuthenticationContext( RepositorySystemSession session, RemoteRepository repository, Proxy proxy,
                                   Authentication auth ); static AuthenticationContext forRepository( RepositorySystemSession session, RemoteRepository repository ); static AuthenticationContext forProxy( RepositorySystemSession session, RemoteRepository repository ); RepositorySystemSession getSession(); RemoteRepository getRepository(); Proxy getProxy(); String get( String key ); T get( String key, Class<T> type ); T get( String key, Map<String, String> data, Class<T> type ); void put( String key, Object value ); void close(); static void close( AuthenticationContext context ); }
AuthenticationContext implements Closeable { public static AuthenticationContext forRepository( RepositorySystemSession session, RemoteRepository repository ) { return newInstance( session, repository, null, repository.getAuthentication() ); } private  AuthenticationContext( RepositorySystemSession session, RemoteRepository repository, Proxy proxy,
                                   Authentication auth ); static AuthenticationContext forRepository( RepositorySystemSession session, RemoteRepository repository ); static AuthenticationContext forProxy( RepositorySystemSession session, RemoteRepository repository ); RepositorySystemSession getSession(); RemoteRepository getRepository(); Proxy getProxy(); String get( String key ); T get( String key, Class<T> type ); T get( String key, Map<String, String> data, Class<T> type ); void put( String key, Object value ); void close(); static void close( AuthenticationContext context ); static final String USERNAME; static final String PASSWORD; static final String NTLM_DOMAIN; static final String NTLM_WORKSTATION; static final String PRIVATE_KEY_PATH; static final String PRIVATE_KEY_PASSPHRASE; static final String HOST_KEY_ACCEPTANCE; static final String HOST_KEY_REMOTE; static final String HOST_KEY_LOCAL; static final String SSL_CONTEXT; static final String SSL_HOSTNAME_VERIFIER; }