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