Top Fields Constructors Methods
org.apache.sshd.server.auth.hostbased

public Class StaticHostBasedAuthenticator

extends AbstractLoggingBean
implements HostBasedAuthenticator
Class Inheritance
All Implemented Interfaces
org.apache.sshd.server.auth.hostbased.HostBasedAuthenticator
Known Direct Subclasses
org.apache.sshd.server.auth.hostbased.AcceptAllHostBasedAuthenticator, org.apache.sshd.server.auth.hostbased.RejectAllHostBasedAuthenticator
Imports
java.security.PublicKey, java.security.cert.X509Certificate, java.util.List, org.apache.sshd.common.config.keys.KeyUtils, org.apache.sshd.common.util.logging.AbstractLoggingBean, org.apache.sshd.server.session.ServerSession

Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
private final boolean
Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
log

Constructor Summary

AccessConstructor and Description
public
StaticHostBasedAuthenticator(boolean acceptance)

Method Summary

Modifier and TypeMethod and Description
public final boolean
authenticate(ServerSession
The ServerSession through which the request was received
session
,
String
The username attempting to login
username
,
PublicKey
The remote client's host PublicKey
clientHostKey
,
String
The reported remote client's host name
clientHostName
,
String
The remote client username
clientUsername
,
List<X509Certificate>
Associated X509Certificates - may be null/empty
certificates
)

Implements org.apache.sshd.server.auth.hostbased.HostBasedAuthenticator.authenticate.

protected void
handleAcceptance(ServerSession session, String username, PublicKey clientHostKey, String clientHostName, String clientUsername, List<X509Certificate> certificates)

protected void
handleRejection(ServerSession session, String username, PublicKey clientHostKey, String clientHostName, String clientUsername, List<X509Certificate> certificates)

public final boolean
Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
debugdebugdebugdebugdebugerrorerrorerrorerrorerrorgetSimplifiedLoggerinfoinfowarnwarnwarnwarnwarnwarnwarnwarn

Field Detail

acceptanceback to summary
private final boolean acceptance

Constructor Detail

StaticHostBasedAuthenticatorback to summary
public StaticHostBasedAuthenticator(boolean acceptance)

Method Detail

authenticateback to summary
public final boolean authenticate(ServerSession session, String username, PublicKey clientHostKey, String clientHostName, String clientUsername, List<X509Certificate> certificates)

Implements org.apache.sshd.server.auth.hostbased.HostBasedAuthenticator.authenticate.

Parameters
session:ServerSession

Doc from org.apache.sshd.server.auth.hostbased.HostBasedAuthenticator.authenticate.

The ServerSession through which the request was received

username:String

Doc from org.apache.sshd.server.auth.hostbased.HostBasedAuthenticator.authenticate.

The username attempting to login

clientHostKey:PublicKey

Doc from org.apache.sshd.server.auth.hostbased.HostBasedAuthenticator.authenticate.

The remote client's host PublicKey

clientHostName:String

Doc from org.apache.sshd.server.auth.hostbased.HostBasedAuthenticator.authenticate.

The reported remote client's host name

clientUsername:String

Doc from org.apache.sshd.server.auth.hostbased.HostBasedAuthenticator.authenticate.

The remote client username

certificates:List<X509Certificate>

Doc from org.apache.sshd.server.auth.hostbased.HostBasedAuthenticator.authenticate.

Associated X509Certificates - may be null/empty

Returns:boolean

Doc from org.apache.sshd.server.auth.hostbased.HostBasedAuthenticator.authenticate.

true whether authentication is allowed to proceed

Annotations
@Override
handleAcceptanceback to summary
protected void handleAcceptance(ServerSession session, String username, PublicKey clientHostKey, String clientHostName, String clientUsername, List<X509Certificate> certificates)
handleRejectionback to summary
protected void handleRejection(ServerSession session, String username, PublicKey clientHostKey, String clientHostName, String clientUsername, List<X509Certificate> certificates)
isAcceptedback to summary
public final boolean isAccepted()