use of org.apache.sshd.server.auth.keyboard.UserAuthKeyboardInteractiveFactory in project karaf by apache.
the class UserAuthFactoriesFactory method setAuthMethods.
public void setAuthMethods(String[] methods) {
this.methodSet = new HashSet<>();
this.factories = new ArrayList<>();
for (String am : methods) {
if (PASSWORD_METHOD.equals(am)) {
this.factories.add(new UserAuthPasswordFactory());
} else if (KEYBOARD_INTERACTIVE_METHOD.equals(am)) {
this.factories.add(new UserAuthKeyboardInteractiveFactory());
} else if (PUBLICKEY_METHOD.equals(am)) {
this.factories.add(new UserAuthPublicKeyFactory());
} else {
throw new IllegalArgumentException("Invalid authentication method " + am + " specified");
}
this.methodSet.add(am);
}
}
Aggregations