better handle of oauth (#1838)

This commit is contained in:
William Cheng
2019-01-08 07:51:02 +08:00
committed by GitHub
parent 233ce093e5
commit ed5bd5ffb0
13 changed files with 68 additions and 27 deletions

View File

@@ -22,7 +22,6 @@ import okio.Okio;
import org.threeten.bp.LocalDate;
import org.threeten.bp.OffsetDateTime;
import org.threeten.bp.format.DateTimeFormatter;
import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder;
import org.apache.oltu.oauth2.common.message.types.GrantType;
@@ -92,7 +91,7 @@ public class ApiClient {
// Prevent the authentications from being modified.
authentications = Collections.unmodifiableMap(authentications);
}
/*
* Constructor for ApiClient to support access token retry on 401/403 configured with client ID
*/
@@ -123,7 +122,7 @@ public class ApiClient {
// Prevent the authentications from being modified.
authentications = Collections.unmodifiableMap(authentications);
}
private void init() {
httpClient = new OkHttpClient();