|
|
|
@ -34,7 +34,6 @@ import net.openid.appauth.NoClientAuthentication;
|
|
|
|
|
|
|
|
|
|
import org.json.JSONException;
|
|
|
|
|
|
|
|
|
|
import java.io.FileNotFoundException;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.Objects;
|
|
|
|
@ -147,7 +146,7 @@ public class ServiceAuthenticator extends Authenticator {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static void OAuthRefresh(Context context, String id, AuthState authState, boolean expire, long keep_alive)
|
|
|
|
|
throws FileNotFoundException, MessagingException {
|
|
|
|
|
throws MessagingException {
|
|
|
|
|
try {
|
|
|
|
|
Long expiration = authState.getAccessTokenExpirationTime();
|
|
|
|
|
if (expiration != null && expiration - keep_alive < new Date().getTime()) {
|
|
|
|
@ -189,8 +188,6 @@ public class ServiceAuthenticator extends Authenticator {
|
|
|
|
|
|
|
|
|
|
if (holder.error != null)
|
|
|
|
|
throw holder.error;
|
|
|
|
|
} catch (FileNotFoundException ex) {
|
|
|
|
|
throw ex; // provider not found
|
|
|
|
|
} catch (Exception ex) {
|
|
|
|
|
throw new MessagingException("OAuth refresh id=" + id, ex);
|
|
|
|
|
}
|
|
|
|
|