public static void decodeAndLogin(String encoded, LoginManager lm) { decodeAndLoginWithCharset(encoded, lm, null); }
LoginManager lm = getMessageBroker().getLoginManager(); switch (msg.getOperation()) Object charsetHeader = msg.getHeader(CommandMessage.CREDENTIALS_CHARSET_HEADER); if (charsetHeader instanceof String) decodeAndLoginWithCharset(encoded, lm, (String)charsetHeader); else decodeAndLoginWithCharset(encoded, lm, null); AuthenticationEvent logoutEvent = buildAuthenticationEvent(null, null); // null username and creds. lm.logout();
private void createServices(MessageBroker broker) AuthenticationService authService = new AuthenticationService(); authService.setMessageBroker(broker);
public Object serviceCommand(CommandMessage msg) { LoginManager lm = getMessageBroker().getLoginManager(); switch (msg.getOperation()) { case CommandMessage.LOGIN_OPERATION: if (msg.getBody() instanceof String) { String encoded = (String)msg.getBody(); Object charsetHeader = msg.getHeader(CommandMessage.CREDENTIALS_CHARSET_HEADER); if (charsetHeader instanceof String) decodeAndLoginWithCharset(encoded, lm, (String)charsetHeader); else decodeAndLoginWithCharset(encoded, lm, null); } break; case CommandMessage.LOGOUT_OPERATION: lm.logout(); break; default: throw new MessageException("Service Does Not Support Command Type " + msg.getOperation()); } return "success"; }
try AuthenticationService.decodeAndLogin(encoded, broker.getLoginManager());
AuthenticationEvent loginEvent = buildAuthenticationEvent(username, password); for (AuthenticationListener listener : authenticationListeners)
LoginManager lm = getMessageBroker().getLoginManager(); switch (msg.getOperation()) Object charsetHeader = msg.getHeader(CommandMessage.CREDENTIALS_CHARSET_HEADER); if (charsetHeader instanceof String) decodeAndLoginWithCharset(encoded, lm, (String)charsetHeader); else decodeAndLoginWithCharset(encoded, lm, null); AuthenticationEvent logoutEvent = buildAuthenticationEvent(null, null); // null username and creds. lm.logout();
private void createServices(MessageBroker broker) AuthenticationService authService = new AuthenticationService(); authService.setMessageBroker(broker);
try ((AuthenticationService)broker.getService(AuthenticationService.ID)).decodeAndLogin(encoded, broker.getLoginManager());
AuthenticationEvent loginEvent = buildAuthenticationEvent(username, password); for (AuthenticationListener listener : authenticationListeners)
private void createServices(MessageBroker broker) AuthenticationService authService = new AuthenticationService(); authService.setMessageBroker(broker);
/** * */ public void decodeAndLogin(String encoded, LoginManager lm) { decodeAndLoginWithCharset(encoded, lm, null); }
try ((AuthenticationService)broker.getService(AuthenticationService.ID)).decodeAndLogin(encoded, broker.getLoginManager());
/** * */ public void decodeAndLogin(String encoded, LoginManager lm) { decodeAndLoginWithCharset(encoded, lm, null); }