Package com.calclab.emite.core.sasl

Examples of com.calclab.emite.core.sasl.Credentials


    logger.info("Loging in from meta data...");
    final String userJID = PageAssist.getMeta(PARAM_JID, null);
    final String password = PageAssist.getMeta(PARAM_PASSWORD, null);
    if (userJID != null && password != null) {
      final XmppURI jid = uri(userJID);
      session.login(new Credentials(jid, password));
      return true;
    } else if (userJID != null && "anonymous".equals(userJID.toLowerCase())) {
      session.login(Credentials.ANONYMOUS);
      return true;
    }
View Full Code Here


    return currentUser != null;
  }

  @Deprecated
  public void login(final XmppURI user, final String password) {
    login(new Credentials(user, password));
  }
View Full Code Here

  }

  @Test
  public void shouldConnectOnLogin() {
    assertFalse(connection.isConnected());
    session.login(new Credentials(uri("name@domain/resource"), "password"));
    assertTrue(connection.isConnected());
  }
View Full Code Here

    assertFalse(connection.isConnected());
  }

  @Test
  public void shouldHandleSucceedAuthorizationResult() {
    eventBus.fireEvent(new AuthorizationResultEvent(new Credentials(uri("node@domain"), "pass")));

    assertEquals(SessionStatus.authorized, session.getStatus());
    assertTrue(connection.isStreamRestarted());
    verify(bindingManager).bindResource(anyString());
  }
View Full Code Here

TOP

Related Classes of com.calclab.emite.core.sasl.Credentials

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.