protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(smtpUsername, smtpPassword); } };
/** * Returns email store. * * @param session {@link Session} * @return {@link com.sun.mail.pop3.POP3SSLStore} */ @Override protected POP3SSLStore getStore(final Session session) { final SimpleAuthenticator simpleAuthenticator = (SimpleAuthenticator) authenticator; final URLName url; if (simpleAuthenticator == null) { url = new URLName( PROTOCOL_POP3, host, port, StringPool.EMPTY, null, null); } else { final PasswordAuthentication pa = simpleAuthenticator.getPasswordAuthentication(); url = new URLName( PROTOCOL_POP3, host, port, StringPool.EMPTY, pa.getUserName(), pa.getPassword()); } return new POP3SSLStore(session, url); }
if (pw != null) { if (user == null) { user = pw.getUserName(); password = pw.getPassword(); } else if (user.equals(pw.getUserName())) { password = pw.getPassword(); null, user); if (pw != null) { user = pw.getUserName(); password = pw.getPassword(); new PasswordAuthentication(user, password));
if (pw != null) { if (user == null) { user = pw.getUserName(); password = pw.getPassword(); } else if (user.equals(pw.getUserName())) { password = pw.getPassword(); null, user); if (pw != null) { user = pw.getUserName(); password = pw.getPassword(); new PasswordAuthentication(user, password));
protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(username, password); } }
/** * Returns email store. * * @param session {@link Session} * @return {@link com.sun.mail.imap.IMAPSSLStore} */ @Override protected IMAPSSLStore getStore(final Session session) { SimpleAuthenticator simpleAuthenticator = (SimpleAuthenticator) authenticator; final URLName url; if (simpleAuthenticator == null) { url = new URLName( PROTOCOL_IMAP, host, port, StringPool.EMPTY, null, null); } else { final PasswordAuthentication pa = simpleAuthenticator.getPasswordAuthentication(); url = new URLName( PROTOCOL_IMAP, host, port, StringPool.EMPTY, pa.getUserName(), pa.getPassword()); } return new IMAPSSLStore(session, url); }
/** * Return new {@link PasswordAuthentication} for given username and password. * * @return {@link PasswordAuthentication} */ @Override public PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(username, password); } }
private void refreshPassword() { if (logger.isLoggable(Level.FINE)) logger.fine("refresh password, user: " + traceUser(user)); InetAddress addr; try { addr = InetAddress.getByName(host); } catch (UnknownHostException e) { addr = null; } PasswordAuthentication pa = session.requestPasswordAuthentication(addr, port, name, null, user); if (pa != null) { user = pa.getUserName(); password = pa.getPassword(); } }
@Override protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(this.user, this.pass); }
private void refreshPassword() { if (logger.isLoggable(Level.FINE)) logger.fine("refresh password, user: " + traceUser(user)); InetAddress addr; try { addr = InetAddress.getByName(host); } catch (UnknownHostException e) { addr = null; } PasswordAuthentication pa = session.requestPasswordAuthentication(addr, port, name, null, user); if (pa != null) { user = pa.getUserName(); password = pa.getPassword(); } }
@Override protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(this.user, this.pass); }
@Override protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(userName, password); } };
@Override protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(userName, password); } };
@Override protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(name, password); }
@Override public PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(this.user, this.password); } }
protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(username, password); } });
protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(username, password); } });
@Override public PasswordAuthentication getPasswordAuthentication() { String username = properties.getProperty("mail.smtp.user"), password = properties.getProperty("mail.smtp.password"); return new PasswordAuthentication(username, password); } }) : Session.getInstance(properties); // without auth
@Override public PasswordAuthentication getPasswordAuthentication() { String username = properties.getProperty("mail.smtp.user"), password = properties.getProperty("mail.smtp.password"); return new PasswordAuthentication(username, password); } }) : Session.getInstance(properties); // without auth
@Override protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(creds.getFrom(), creds.getPassword()); } });