forked from loafle/openapi-generator-original
fix typo in java feign client (#11751)
This commit is contained in:
parent
d2b80984ed
commit
9d86d1db5e
@ -299,7 +299,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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -274,7 +274,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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user