Package com.sshtools.common.automate
Class RemoteIdentification
- java.lang.Object
-
- com.sshtools.common.automate.RemoteIdentification
-
public class RemoteIdentification extends java.lang.Object- Version:
- $Revision: 1.19 $
- Author:
- $author$
-
-
Field Summary
Fields Modifier and Type Field Description static intADD_AUTHORIZEDKEYprotected org.apache.commons.logging.Loglogstatic intREMOVE_AUTHORIZEDKEY
-
Constructor Summary
Constructors Constructor Description RemoteIdentification(java.lang.String defaultName)Creates a new RemoteIdentification object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddRule(RemoteIdentificationRule rule)booleanconfigureUserAccess(SftpClient sftp, java.lang.String serverId, java.lang.String system, java.lang.String username, SshPublicKey pk, java.lang.String authorizationFile, int mode)booleanconfigureUserAccess(SftpClient sftp, java.lang.String serverId, java.lang.String system, java.lang.String username, java.util.List keys, java.lang.String authorizationFile, int mode)java.lang.StringgetAuthorizedKeysDefaultPath()AuthorizedKeysFormatgetAuthorizedKeysFormat()java.lang.StringgetDefaultName()java.lang.StringgetName(java.lang.String ident)protected java.util.ListgetRules()protected voidsetAuthorizedKeysDefaultPath(java.lang.String defaultPath)protected voidsetAuthorizedKeysFormat(java.lang.Class implementationClass)protected booleantestRules(java.lang.String ident)
-
-
-
Field Detail
-
ADD_AUTHORIZEDKEY
public static final int ADD_AUTHORIZEDKEY
- See Also:
- Constant Field Values
-
REMOVE_AUTHORIZEDKEY
public static final int REMOVE_AUTHORIZEDKEY
- See Also:
- Constant Field Values
-
log
protected org.apache.commons.logging.Log log
-
-
Method Detail
-
getRules
protected java.util.List getRules()
- Returns:
-
getDefaultName
public java.lang.String getDefaultName()
- Returns:
-
getName
public java.lang.String getName(java.lang.String ident) throws RemoteIdentificationException- Parameters:
ident-- Returns:
- Throws:
RemoteIdentificationException
-
addRule
protected void addRule(RemoteIdentificationRule rule)
- Parameters:
rule-
-
testRules
protected boolean testRules(java.lang.String ident)
- Parameters:
ident-- Returns:
-
setAuthorizedKeysFormat
protected void setAuthorizedKeysFormat(java.lang.Class implementationClass)
- Parameters:
implementationClass-
-
setAuthorizedKeysDefaultPath
protected void setAuthorizedKeysDefaultPath(java.lang.String defaultPath)
- Parameters:
defaultPath-
-
getAuthorizedKeysDefaultPath
public java.lang.String getAuthorizedKeysDefaultPath()
- Returns:
-
getAuthorizedKeysFormat
public AuthorizedKeysFormat getAuthorizedKeysFormat() throws RemoteIdentificationException
- Returns:
- Throws:
RemoteIdentificationException
-
configureUserAccess
public boolean configureUserAccess(SftpClient sftp, java.lang.String serverId, java.lang.String system, java.lang.String username, SshPublicKey pk, java.lang.String authorizationFile, int mode) throws RemoteIdentificationException
- Parameters:
sftp-serverId-system-username-pk-authorizationFile-mode-- Returns:
- Throws:
RemoteIdentificationException
-
configureUserAccess
public boolean configureUserAccess(SftpClient sftp, java.lang.String serverId, java.lang.String system, java.lang.String username, java.util.List keys, java.lang.String authorizationFile, int mode) throws RemoteIdentificationException
- Parameters:
sftp-serverId-system-username-keys-authorizationFile-mode-- Returns:
- Throws:
RemoteIdentificationException
-
-