Package org.apache.sshd.server

Examples of org.apache.sshd.server.PasswordAuthenticator


      server.setSubsystemFactories(namedFactoryList);

      //
      for (AuthenticationPlugin authenticationPlugin : authenticationPlugins) {
        if (server.getPasswordAuthenticator() == null && authenticationPlugin.getCredentialType().equals(String.class)) {
          server.setPasswordAuthenticator(new PasswordAuthenticator() {
            public boolean authenticate(String _username, String _password, ServerSession session) {
              if (genericAuthenticate(String.class, _username, _password)) {
                // We store username and password in session for later reuse
                session.setAttribute(USERNAME, _username);
                session.setAttribute(PASSWORD, _password);
View Full Code Here


    };
  }

  @Override
  public void afterPropertiesSet() throws Exception {
    server.setPasswordAuthenticator(new PasswordAuthenticator() {


      @Override
      public boolean authenticate(String username, String password,
          org.apache.sshd.server.session.ServerSession session) {
View Full Code Here

                } else {
                    return new UnknownCommand( command );
                }
            }
        } );
        sshd.setPasswordAuthenticator( new PasswordAuthenticator() {
            @Override
            public boolean authenticate( final String username,
                                         final String password,
                                         final ServerSession session ) {
                return getUserPassAuthenticator().authenticate( username, password, new Session() {
View Full Code Here

TOP

Related Classes of org.apache.sshd.server.PasswordAuthenticator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.