annotate src/org/tmatesoft/hg/auth/HgAuthMethod.java @ 710:cf200271439a

KeywordFilter: 'IllegalStateException: need buffer of at least...' during status op for a small file
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Mon, 07 Oct 2013 01:56:05 +0200
parents a483b2b68a2e
children
rev   line source
699
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
1 /*
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
2 * Copyright (c) 2013 TMate Software Ltd
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
3 *
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
4 * This program is free software; you can redistribute it and/or modify
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
5 * it under the terms of the GNU General Public License as published by
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
6 * the Free Software Foundation; version 2 of the License.
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
7 *
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
8 * This program is distributed in the hope that it will be useful,
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
11 * GNU General Public License for more details.
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
12 *
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
13 * For information on how to redistribute this software under
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
14 * the terms of a license other than GNU General Public License
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
15 * contact TMate Software at support@hg4j.com
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
16 */
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
17 package org.tmatesoft.hg.auth;
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
18
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
19 import java.io.InputStream;
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
20 import java.security.cert.X509Certificate;
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
21
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
22 import org.tmatesoft.hg.internal.Experimental;
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
23
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
24 /**
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
25 * Clients do not implement this interface, instead, they invoke appropriate authentication method
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
26 * once they got user input
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
27 *
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
28 * @author Artem Tikhomirov
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
29 * @author TMate Software Ltd.
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
30 * @since 1.2
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
31 */
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
32 @Experimental(reason="Provisional API. Work in progress")
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
33 public interface HgAuthMethod {
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
34 public void noCredentials() throws HgAuthFailedException;
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
35 public boolean supportsPassword();
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
36 public void withPassword(String username, String password) throws HgAuthFailedException;
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
37 public boolean supportsPublicKey();
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
38 public void withPublicKey(String username, InputStream privateKey, String passphrase) throws HgAuthFailedException;
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
39 public boolean supportsCertificate();
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
40 public void withCertificate(X509Certificate[] clientCertChain) throws HgAuthFailedException;
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
41 }