annotate src/org/tmatesoft/hg/auth/HgAuthenticator.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 org.tmatesoft.hg.core.SessionContext;
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
20 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
21 import org.tmatesoft.hg.repo.HgRemoteRepository.RemoteDescriptor;
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
22
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 * Client may implement this interface if they need more control over authentication process.
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
25 *
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
26 * @see SessionContext#getAuthenticator(RemoteDescriptor)
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 HgAuthenticator {
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
34 // XXX either another AuthMethod or a separate #authenticate
a483b2b68a2e Provisional APIs and respective implementation for http, https and ssh remote repositories
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
35 // to perform server check. Alternatively, as methods in AuthMethod
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 authenticate(RemoteDescriptor rd, HgAuthMethod authMethod) 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 }