Class ExampleAccessManager
java.lang.Object
ExampleAccessManager
- All Implemented Interfaces:
- AccessManager
public class ExampleAccessManager
- extends Object
- implements AccessManager
An example AccessManager that provides the
ability to restrict access to SSH features based upon the username
of the connected user.
- Author:
- Lee David Painter
|
Method Summary |
boolean |
canExecuteCommand(String sessionid,
String username,
String cmd)
|
boolean |
canForward(String sessionid,
String username,
ForwardingChannel channel,
boolean isLocal)
|
boolean |
canListen(String sessionid,
String username,
String bindAddress,
int bindPort)
|
boolean |
canOpenChannel(String sessionid,
String username,
Channel channel)
|
boolean |
canStartShell(String sessionid,
String username)
|
boolean |
canStartSubsystem(String sessionid,
String username,
String subsystem)
|
String[] |
getRequiredAuthentications(String sessionid,
String username)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExampleAccessManager
public ExampleAccessManager()
canOpenChannel
public boolean canOpenChannel(String sessionid,
String username,
Channel channel)
- Specified by:
canOpenChannel in interface AccessManager
canStartShell
public boolean canStartShell(String sessionid,
String username)
- Specified by:
canStartShell in interface AccessManager
canExecuteCommand
public boolean canExecuteCommand(String sessionid,
String username,
String cmd)
- Specified by:
canExecuteCommand in interface AccessManager
canStartSubsystem
public boolean canStartSubsystem(String sessionid,
String username,
String subsystem)
- Specified by:
canStartSubsystem in interface AccessManager
canForward
public boolean canForward(String sessionid,
String username,
ForwardingChannel channel,
boolean isLocal)
- Specified by:
canForward in interface AccessManager
canListen
public boolean canListen(String sessionid,
String username,
String bindAddress,
int bindPort)
- Specified by:
canListen in interface AccessManager
getRequiredAuthentications
public String[] getRequiredAuthentications(String sessionid,
String username)
- Specified by:
getRequiredAuthentications in interface AccessManager
Copyright © 2012. All Rights Reserved.