Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,6 @@ CompletableFuture<AuthorizationCode> loadAuthorizationCode(
CompletableFuture<OAuthToken> exchangeAuthorizationCode(
OAuthClientInformation client, AuthorizationCode authorizationCode) throws TokenException;

/**
* Loads a RefreshToken by its token string.
* @param client The client that is requesting to load the refresh token.
* @param refreshToken The refresh token string to load.
* @return A CompletableFuture that resolves to the RefreshToken object if found, or
* null if not found.
*/
CompletableFuture<RefreshToken> loadRefreshToken(
OAuthClientInformation client, String refreshToken);

/**
* Exchanges a refresh token for an access token and refresh token.
* @param client The client exchanging the refresh token.
Expand All @@ -98,14 +88,6 @@ CompletableFuture<OAuthToken> exchangeRefreshToken(
OAuthClientInformation client, RefreshToken refreshToken, List<String> scopes)
throws TokenException;

/**
* Loads an access token by its token.
* @param token The access token to verify.
* @return A CompletableFuture that resolves to the AccessToken, or null if the token
* is invalid.
*/
CompletableFuture<AccessToken> loadAccessToken(String token);

/**
* Revokes an access or refresh token.
* @param token The token to revoke.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import lombok.extern.slf4j.Slf4j;
import org.openmetadata.mcp.auth.AccessToken;
import org.openmetadata.mcp.auth.AuthorizationCode;
import org.openmetadata.mcp.auth.AuthorizationParams;
import org.openmetadata.mcp.auth.OAuthAuthorizationServerProvider;
Expand Down Expand Up @@ -807,16 +806,6 @@ public CompletableFuture<AuthorizationCode> loadAuthorizationCode(
}
}

@Override
public CompletableFuture<RefreshToken> loadRefreshToken(
OAuthClientInformation client, String refreshToken) {
// Refresh token validation happens in exchangeRefreshToken which verifies JWT directly
// This method is not used in the current implementation
return CompletableFuture.failedFuture(
new UnsupportedOperationException(
"loadRefreshToken not implemented - use exchangeRefreshToken instead"));
}

@Override
public CompletableFuture<OAuthToken> exchangeRefreshToken(
OAuthClientInformation client, RefreshToken refreshToken, List<String> scopes)
Expand Down Expand Up @@ -940,15 +929,6 @@ public CompletableFuture<OAuthToken> exchangeRefreshToken(
}
}

@Override
public CompletableFuture<AccessToken> loadAccessToken(String token) {
// Access token validation happens through JwtFilter which verifies JWT directly
// This method is not used in the current implementation
return CompletableFuture.failedFuture(
new UnsupportedOperationException(
"loadAccessToken not implemented - tokens are validated via JwtFilter"));
}

@Override
public CompletableFuture<Void> revokeToken(Object token) {
LOG.info("Token revocation requested");
Expand Down
Loading