3 Copyright (C) 2010 Belledonne Communications, Grenoble, France
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 package org.linphone.core;
21 * Object holding authentication information.
22 * In most case, authentication information consists of a username and password. Sometimes, a userid is required by proxy, and realm can be useful to discriminate different SIP domains.
23 *<br>This object is instantiated using either {@link LinphoneCoreFactory#createAuthInfo(String, String, String)} or {@link LinphoneCoreFactory#createAuthInfo(String, String, String, String, String)}.
25 *Once created and filled, a LinphoneAuthInfo must be added to the LinphoneCore in order to become known and used automatically when needed.
26 *Use {@link LinphoneCore#addAuthInfo(LinphoneAuthInfo)} for that purpose.
28 *The LinphoneCore object can take the initiative to request authentication information when needed to the application
29 *through the {@link LinphoneCoreListener#authInfoRequested(LinphoneCore, String, String)} listener.
31 *The application can respond to this information request later using {@link LinphoneCore#addAuthInfo(LinphoneAuthInfo)}.
32 *This will unblock all pending authentication transactions and retry them with authentication headers.
35 public interface LinphoneAuthInfo {
45 void setUsername(String username);
55 void setPassword(String password);
65 void setRealm(String realm);
67 * get auth userid has used in authentication header. If null, username is taken for authentication
72 * set auth userid has used in authentication header. If null, username is taken for authentication
75 void setUserId(String userid);
84 void setHa1(String ha1);