public class DefaultAuthenticationMechanismFactory extends Object implements AuthenticationMechanismFactory
Modifier and Type | Field and Description |
---|---|
protected List<KeyboardInteractiveAuthenticationProvider> |
keyboardInteractiveProviders |
protected List<PasswordAuthenticationProvider> |
passwordProviders |
protected List<PublicKeyAuthenticationProvider> |
publickeyProviders |
protected Set<String> |
requiredMechanisms |
protected Set<String> |
supportedMechanisms |
KEYBOARD_INTERACTIVE_AUTHENTICATION, NONE, PASSWORD_AUTHENTICATION, PUBLICKEY_AUTHENTICATION
Constructor and Description |
---|
DefaultAuthenticationMechanismFactory() |
protected List<PasswordAuthenticationProvider> passwordProviders
protected List<PublicKeyAuthenticationProvider> publickeyProviders
protected List<KeyboardInteractiveAuthenticationProvider> keyboardInteractiveProviders
public DefaultAuthenticationMechanismFactory()
public void addPasswordAuthenticationProvider(PasswordAuthenticationProvider provider)
public void removePasswordAuthenticationProvider(PasswordAuthenticationProvider provider)
public void addPublicKeyAuthenticationProvider(PublicKeyAuthenticationProvider provider)
public void removePublicKeyAuthenticationProvider(PublicKeyAuthenticationProvider provider)
public void addKeyboardInteractiveProvider(KeyboardInteractiveAuthenticationProvider provider)
public void removeKeyboardInteractiveProvider(KeyboardInteractiveProvider provider)
public void addProvider(Authenticator provider)
addProvider
in interface AuthenticationMechanismFactory
public AuthenticationMechanism createInstance(String name, TransportProtocol<SshServerContext> transport, AuthenticationProtocolServer authentication, Connection<SshServerContext> con) throws UnsupportedChannelException
createInstance
in interface AuthenticationMechanismFactory
UnsupportedChannelException
public KeyboardInteractiveAuthenticationProvider[] getKeyboardInteractiveProviders(Connection<SshServerContext> con)
public String[] getRequiredMechanisms(Connection<SshServerContext> con)
getRequiredMechanisms
in interface AuthenticationMechanismFactory
public String[] getSupportedMechanisms()
getSupportedMechanisms
in interface AuthenticationMechanismFactory
public PublicKeyAuthenticationProvider[] getPublicKeyAuthenticationProviders(Connection<SshServerContext> con)
public PasswordAuthenticationProvider[] getPasswordAuthenticationProviders(Connection<SshServerContext> con)
public void addRequiredMechanism(String method)
addRequiredMechanism
in interface AuthenticationMechanismFactory
public void removeRequiredMechanism(String method)
removeRequiredMechanism
in interface AuthenticationMechanismFactory
public Authenticator[] getProviders(String name, Connection<SshServerContext> con)
getProviders
in interface AuthenticationMechanismFactory
public boolean isSupportedMechanism(String currentMethod)
isSupportedMechanism
in interface AuthenticationMechanismFactory
Copyright © 2016. All rights reserved.