mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 14:46:31 +02:00
Pre expire tokens
This commit is contained in:
@@ -309,7 +309,7 @@ public class EmailService implements AutoCloseable {
|
||||
public void connect(EntityAccount account) throws MessagingException {
|
||||
connect(
|
||||
account.host, account.port,
|
||||
account.auth_type, account.provider,
|
||||
account.auth_type, account.provider, account.poll_interval,
|
||||
account.user, account.password,
|
||||
new ServiceAuthenticator.IAuthenticated() {
|
||||
@Override
|
||||
@@ -326,7 +326,7 @@ public class EmailService implements AutoCloseable {
|
||||
public void connect(EntityIdentity identity) throws MessagingException {
|
||||
connect(
|
||||
identity.host, identity.port,
|
||||
identity.auth_type, identity.provider,
|
||||
identity.auth_type, identity.provider, 0,
|
||||
identity.user, identity.password,
|
||||
new ServiceAuthenticator.IAuthenticated() {
|
||||
@Override
|
||||
@@ -342,14 +342,16 @@ public class EmailService implements AutoCloseable {
|
||||
|
||||
public void connect(
|
||||
String host, int port,
|
||||
int auth, String provider, String user, String password,
|
||||
int auth, String provider,
|
||||
String user, String password,
|
||||
String certificate, String fingerprint) throws MessagingException {
|
||||
connect(host, port, auth, provider, user, password, null, certificate, fingerprint);
|
||||
connect(host, port, auth, provider, 0, user, password, null, certificate, fingerprint);
|
||||
}
|
||||
|
||||
private void connect(
|
||||
String host, int port,
|
||||
int auth, String provider, String user, String password,
|
||||
int auth, String provider, int keep_alive,
|
||||
String user, String password,
|
||||
ServiceAuthenticator.IAuthenticated intf,
|
||||
String certificate, String fingerprint) throws MessagingException {
|
||||
SSLSocketFactoryService factory = null;
|
||||
@@ -378,7 +380,8 @@ public class EmailService implements AutoCloseable {
|
||||
}
|
||||
|
||||
properties.put("mail." + protocol + ".forcepasswordrefresh", "true");
|
||||
ServiceAuthenticator authenticator = new ServiceAuthenticator(context, auth, provider, user, password, intf);
|
||||
ServiceAuthenticator authenticator = new ServiceAuthenticator(context,
|
||||
auth, provider, keep_alive, user, password, intf);
|
||||
|
||||
try {
|
||||
if (auth == AUTH_TYPE_GMAIL || auth == AUTH_TYPE_OAUTH) {
|
||||
|
||||
Reference in New Issue
Block a user