public class DefaultAuthenticationMechanismFactory<C extends Context> extends java.lang.Object implements AuthenticationMechanismFactory<C>
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<KeyboardInteractiveAuthenticationProvider> |
keyboardInteractiveProviders |
protected java.util.List<PasswordAuthenticationProvider> |
passwordProviders |
protected java.util.List<PublicKeyAuthenticationProvider> |
publickeyProviders |
protected java.util.Set<java.lang.String> |
required |
protected java.util.Set<java.lang.String> |
supportedMechanisms |
KEYBOARD_INTERACTIVE_AUTHENTICATION, NONE, PASSWORD_AUTHENTICATION, PUBLICKEY_AUTHENTICATION| Constructor and Description |
|---|
DefaultAuthenticationMechanismFactory() |
protected java.util.Set<java.lang.String> required
protected java.util.Set<java.lang.String> supportedMechanisms
protected java.util.List<PasswordAuthenticationProvider> passwordProviders
protected java.util.List<PublicKeyAuthenticationProvider> publickeyProviders
protected java.util.List<KeyboardInteractiveAuthenticationProvider> keyboardInteractiveProviders
public DefaultAuthenticationMechanismFactory()
public void addRequiredAuthentication(java.lang.String req)
public void removeRequiredAuthentication(java.lang.String req)
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<C extends Context>public AuthenticationMechanism createInstance(java.lang.String name, AbstractServerTransport<C> transport, AbstractAuthenticationProtocol<C> authentication, SshConnection con) throws UnsupportedChannelException
createInstance in interface AuthenticationMechanismFactory<C extends Context>UnsupportedChannelExceptionpublic KeyboardInteractiveAuthenticationProvider[] getKeyboardInteractiveProviders(SshConnection con)
public java.lang.String[] getRequiredMechanisms(SshConnection con)
getRequiredMechanisms in interface AuthenticationMechanismFactory<C extends Context>public java.lang.String[] getSupportedMechanisms()
getSupportedMechanisms in interface AuthenticationMechanismFactory<C extends Context>public PublicKeyAuthenticationProvider[] getPublicKeyAuthenticationProviders(SshConnection con)
public PasswordAuthenticationProvider[] getPasswordAuthenticationProviders(SshConnection con)
public Authenticator[] getProviders(java.lang.String name, SshConnection con)
getProviders in interface AuthenticationMechanismFactory<C extends Context>public void addProviders(java.util.Collection<Authenticator> authenticators)
addProviders in interface AuthenticationMechanismFactory<C extends Context>public boolean isSupportedMechanism(java.lang.String method)
isSupportedMechanism in interface AuthenticationMechanismFactory<C extends Context>Copyright © 2022. All rights reserved.