Package com.sshtools.common.auth
Class DefaultAuthenticationMechanismFactory<C extends Context>
java.lang.Object
com.sshtools.common.auth.DefaultAuthenticationMechanismFactory<C>
- All Implemented Interfaces:
AuthenticationMechanismFactory<C>
public class DefaultAuthenticationMechanismFactory<C extends Context>
extends Object
implements AuthenticationMechanismFactory<C>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<KeyboardInteractiveAuthenticationProvider>protected List<PasswordAuthenticationProvider>protected List<PublicKeyAuthenticationProvider>Fields inherited from interface com.sshtools.common.auth.AuthenticationMechanismFactory
KEYBOARD_INTERACTIVE_AUTHENTICATION, NONE, PASSWORD_AUTHENTICATION, PUBLICKEY_AUTHENTICATION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidaddProvider(Authenticator provider) voidaddProviders(Collection<Authenticator> authenticators) voidvoidcreateInstance(String name, AbstractServerTransport<C> transport, AbstractAuthenticationProtocol<C> authentication, SshConnection con) getProviders(String name, SshConnection con) String[]String[]booleanisSupportedMechanism(String method) voidvoidvoidvoid
-
Field Details
-
required
-
supportedMechanisms
-
passwordProviders
-
publickeyProviders
-
keyboardInteractiveProviders
-
-
Constructor Details
-
DefaultAuthenticationMechanismFactory
public DefaultAuthenticationMechanismFactory()
-
-
Method Details
-
addRequiredAuthentication
-
removeRequiredAuthentication
-
addPasswordAuthenticationProvider
-
removePasswordAuthenticationProvider
-
addPublicKeyAuthenticationProvider
-
removePublicKeyAuthenticationProvider
-
addKeyboardInteractiveProvider
-
removeKeyboardInteractiveProvider
-
addProvider
- Specified by:
addProviderin interfaceAuthenticationMechanismFactory<C extends Context>
-
createInstance
public AuthenticationMechanism createInstance(String name, AbstractServerTransport<C> transport, AbstractAuthenticationProtocol<C> authentication, SshConnection con) throws UnsupportedChannelException - Specified by:
createInstancein interfaceAuthenticationMechanismFactory<C extends Context>- Throws:
UnsupportedChannelException
-
getKeyboardInteractiveProviders
public KeyboardInteractiveAuthenticationProvider[] getKeyboardInteractiveProviders(SshConnection con) -
getRequiredMechanisms
- Specified by:
getRequiredMechanismsin interfaceAuthenticationMechanismFactory<C extends Context>
-
getSupportedMechanisms
- Specified by:
getSupportedMechanismsin interfaceAuthenticationMechanismFactory<C extends Context>
-
getPublicKeyAuthenticationProviders
-
getPasswordAuthenticationProviders
-
getProviders
- Specified by:
getProvidersin interfaceAuthenticationMechanismFactory<C extends Context>
-
addProviders
- Specified by:
addProvidersin interfaceAuthenticationMechanismFactory<C extends Context>
-
isSupportedMechanism
- Specified by:
isSupportedMechanismin interfaceAuthenticationMechanismFactory<C extends Context>
-