Skip to content

Commit

Permalink
update comment in AuthSession and delete validate in BearTokenCredent…
Browse files Browse the repository at this point in the history
…ialsProvider
  • Loading branch information
jerry-024 committed Dec 9, 2024
1 parent 4a08b0b commit 5e09533
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private static void scheduleTokenRefresh(
int retryTimes) {
if (retryTimes < TOKEN_REFRESH_NUM_RETRIES) {
long expiresInMillis = expiresAtMillis - System.currentTimeMillis();
// how much ahead of time to start the request to allow it to complete
// how much ahead of time to start the refresh to allow it to complete
long refreshWindowMillis = Math.min(expiresInMillis, MAX_REFRESH_WINDOW_MILLIS);
// how much time to wait before expiration
long waitIntervalMillis = expiresInMillis - refreshWindowMillis;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,13 @@

package org.apache.paimon.rest.auth;

import org.apache.paimon.utils.StringUtils;

/** credentials provider for bear token. */
public class BearTokenCredentialsProvider extends BaseBearTokenCredentialsProvider {

private final String token;

public BearTokenCredentialsProvider(String token) {
if (StringUtils.isNullOrWhitespaceOnly(token)) {
throw new IllegalArgumentException("token is null");
} else {
this.token = token;
}
this.token = token;
}

@Override
Expand Down

0 comments on commit 5e09533

Please sign in to comment.