1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
/*******************************************************************************
* Copyright (c) 2007 JCraft,Inc. and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Atsuhiko Yamanaka, JCraft,Inc. - initial API and implementation
*******************************************************************************/
package org.eclipse.jsch.internal.core;
import org.eclipse.jsch.core.IJSchLocation;
/**
* This class will be used whenever nobody gives
* the implementation of IUserAuthenticator.
* @since 1.1
*/
class NullUserAuthenticator implements IUserAuthenticator{
/**
* @see IUserAuthenticator#prompt(IJSchLocation location, int promptType, String title,
String message, int[] promptResponses, int defaultResponseIndex)
*/
public int prompt(IJSchLocation location, int promptType, String title,
String message, int[] promptResponses, int defaultResponseIndex){
return IUserAuthenticator.CANCEL_ID;
}
/**
* @see IUserAuthenticator#promptForHostKeyChange(IJSchLocation location)
*/
public boolean promptForHostKeyChange(IJSchLocation location){
return false;
}
/**
* @see IUserAuthenticator#promptForKeyboradInteractive(IJSchLocation location, String destination, String name, String instruction, String[] prompt, boolean[] echo)
*/
public String[] promptForKeyboradInteractive(IJSchLocation location,
String destination, String name, String instruction, String[] prompt,
boolean[] echo){
return null;
}
/**
* @see IUserAuthenticator#promptForUserInfo(IJSchLocation, IUserInfo, String)
*/
public void promptForUserInfo(IJSchLocation location, IUserInfo userInfo,
String message){
// no operation
}
}
|