Assume tokens with expiry have always expired (#4644)
This commit is contained in:
parent
df03570a4f
commit
49c489dac0
|
|
@ -86,6 +86,11 @@ public class OAuth2 extends AuthenticationDTO {
|
|||
"Expected datasource to have valid authentication tokens at this point"));
|
||||
}
|
||||
|
||||
if (this.authenticationResponse.expiresAt == null) {
|
||||
// If the token did not return with an expiry time, assume that it has always expired
|
||||
return Mono.just(Boolean.TRUE);
|
||||
}
|
||||
|
||||
return Mono.just(authenticationResponse.expiresAt.isBefore(Instant.now().plusSeconds(60)));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user