Interface OAuth2BrowserCallback


public interface OAuth2BrowserCallback
Callback interface for OAuth 2.0 browser-based authorization. Implementations can use JavaFX WebView, system browser, CDP, etc.
  • Method Details

    • openBrowserForAuthorization

      CompletableFuture<String> openBrowserForAuthorization(String authorizationUrl, String redirectUri)
      Open browser for user authorization. The implementation should: 1. Open the authorization URL in a browser (WebView, system browser, etc.) 2. Wait for the OAuth provider to redirect to redirectUri 3. Extract the authorization code from the redirect 4. Complete the future with the code
      Parameters:
      authorizationUrl - Full authorization URL with all query parameters
      redirectUri - The redirect URI that will receive the authorization code
      Returns:
      CompletableFuture that completes with authorization code or error
    • cancel

      default void cancel()
      Optional: Cancel ongoing authorization