Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/coveragereport/badge_branchcoverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ final class OAuth2TokenAuthenticator implements Authenticator {

@Override
public synchronized Request authenticate(Route route, Response response) throws IOException {
if(response.priorResponse() != null && response.priorResponse().priorResponse() != null) {
//We've already tried to authenticate, we must not have proper credentials;
return null;
}
OAuth2Token token = tokenProvider.getToken();
if (token == null) {
throw new IOException("Attempt to refresh token failed: No token retrieved from " + OAuth2TokenProvider.class.getName());
Expand Down