1 /******************************************************************************* 2 * Copyright (c) 2000, 2007 IBM Corporation and others. 3 * 4 * This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License 2.0 6 * which accompanies this distribution, and is available at 7 * https://www.eclipse.org/legal/epl-2.0/ 8 * 9 * SPDX-License-Identifier: EPL-2.0 10 * 11 * Contributors: 12 * IBM Corporation - initial API and implementation 13 * Atsuhiko Yamanaka, JCraft,Inc. - copying this class from cvs.core plug-in 14 *******************************************************************************/ 15 package org.eclipse.jsch.internal.core; 16 /** 17 * Instances of this class represent a user name password pair. 18 * Both values can be set and the user name can be retrieved. 19 * However, it is possible that the user name is not mutable. 20 * Users must check before trying to set the user name. 21 * 22 * Clients are not expected to implement this interface 23 * @since 1.1 24 */ 25 public interface IUserInfo{ 26 /** 27 * Get the user name for this user. 28 * @return user name 29 */ getUsername()30 public String getUsername(); 31 32 /** 33 * Sets the user name for this user. This should not be called if 34 * isUsernameMutable() returns false. 35 * @param username a user name for this user 36 */ setUsername(String username)37 public void setUsername(String username); 38 39 /** 40 * Return true if the user name is mutable. If not, setUsername should not be called. 41 * @return a flag for isUsernameMutable 42 */ isUsernameMutable()43 public boolean isUsernameMutable(); 44 45 /** 46 * Sets the password for this user. 47 * @param password a password for this user 48 */ setPassword(String password)49 public void setPassword(String password); 50 } 51