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> |
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(KeyboardInteractiveAuthenticationProvider provider)
public void addProvider(Authenticator provider)
addProvider
in interface AuthenticationMechanismFactory
public AuthenticationMechanism createInstance(String name, TransportProtocol transport, AuthenticationProtocol authentication, Connection con) throws UnsupportedChannelException
createInstance
in interface AuthenticationMechanismFactory
UnsupportedChannelException
public KeyboardInteractiveAuthenticationProvider[] getKeyboardInteractiveProviders(Connection con)
public String[] getRequiredMechanisms(Connection con)
getRequiredMechanisms
in interface AuthenticationMechanismFactory
public String[] getSupportedMechanisms()
getSupportedMechanisms
in interface AuthenticationMechanismFactory
public PublicKeyAuthenticationProvider[] getPublicKeyAuthenticationProviders(Connection con)
public PasswordAuthenticationProvider[] getPasswordAuthenticationProviders(Connection con)
public Authenticator[] getProviders(String name, Connection con)
getProviders
in interface AuthenticationMechanismFactory
Copyright © 2024. All rights reserved.