Examples of PasswordAuthenticator


Examples of org.apache.sshd.server.PasswordAuthenticator

        Security.addProvider(new BouncyCastleProvider());
    }

    private static PasswordAuthenticator passwordAuthenticator()
    {
        return new PasswordAuthenticator()
        {

            @Override
            public boolean authenticate(String arg0, String arg1, ServerSession arg2)
            {
View Full Code Here

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

Examples of org.apache.sshd.server.PasswordAuthenticator

    };
  }

  @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

Examples of org.apache.sshd.server.PasswordAuthenticator

                } 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

Examples of org.languagetool.rules.patterns.PasswordAuthenticator

* @author Daniel Naber
*/
public final class XMLValidator {

  public XMLValidator() {
    Authenticator.setDefault(new PasswordAuthenticator());
  }
View Full Code Here

Examples of org.languagetool.rules.patterns.PasswordAuthenticator

  public final List<DisambiguationPatternRule> getRules(final InputStream stream)
      throws ParserConfigurationException, SAXException, IOException {
    final DisambiguationRuleHandler handler = new DisambiguationRuleHandler();
    final SAXParserFactory factory = SAXParserFactory.newInstance();
    final SAXParser saxParser = factory.newSAXParser();
    Authenticator.setDefault(new PasswordAuthenticator());
    saxParser.parse(stream, handler);
    return handler.getDisambRules();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.