mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-09 12:46:11 +00:00
fix typo in java feign client (#11751)
This commit is contained in:
@@ -267,7 +267,7 @@ public class ApiClient {
|
||||
|
||||
/**
|
||||
* Configures a listener which is notified when a new access token is received.
|
||||
* @param accessTokenListener Acesss token listener
|
||||
* @param accessTokenListener Access token listener
|
||||
*/
|
||||
public void registerAccessTokenListener(AccessTokenListener accessTokenListener) {
|
||||
OAuth apiAuthorization = getAuthorization(OAuth.class);
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.Collection;
|
||||
public abstract class OAuth implements RequestInterceptor {
|
||||
|
||||
//https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.4
|
||||
static final int LEEWAY_SENCONDS = 10;
|
||||
static final int LEEWAY_SECONDS = 10;
|
||||
|
||||
static final int MILLIS_PER_SECOND = 1000;
|
||||
|
||||
@@ -90,7 +90,7 @@ public abstract class OAuth implements RequestInterceptor {
|
||||
*/
|
||||
public synchronized void setAccessToken(String accessToken, Integer expiresIn) {
|
||||
this.accessToken = accessToken;
|
||||
this.expirationTimeSeconds = expiresIn == null ? null : System.currentTimeMillis() / MILLIS_PER_SECOND + expiresIn - LEEWAY_SENCONDS;
|
||||
this.expirationTimeSeconds = expiresIn == null ? null : System.currentTimeMillis() / MILLIS_PER_SECOND + expiresIn - LEEWAY_SECONDS;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user