Skip to content

feat(rest): implement OAuth2 token auto-refresh for REST catalog#646

Open
lishuxu wants to merge 1 commit intoapache:mainfrom
lishuxu:feature/oauth_2
Open

feat(rest): implement OAuth2 token auto-refresh for REST catalog#646
lishuxu wants to merge 1 commit intoapache:mainfrom
lishuxu:feature/oauth_2

Conversation

@lishuxu
Copy link
Copy Markdown
Contributor

@lishuxu lishuxu commented May 9, 2026

Replace the MakeOAuth2 stub with a full OAuth2AuthSession that
automatically refreshes tokens before expiration using the
client_credentials grant.

Key components:
- OAuth2AuthSession: manages token lifecycle with shared_mutex for concurrent read access and background refresh via scheduler
- TokenRefreshScheduler: process-global singleton with a single worker thread that fires delayed refresh callbacks
- ExpiresAtMillis: JWT exp claim parser for determining token expiry when expires_in is not provided in the token response
- Base64Decode/Base64UrlDecode added to TransformUtil as public utilities

    Replace the MakeOAuth2 stub with a full OAuth2AuthSession that
    automatically refreshes tokens before expiration using the
    client_credentials grant.

    Key components:
    - OAuth2AuthSession: manages token lifecycle with shared_mutex for
      concurrent read access and background refresh via scheduler
    - TokenRefreshScheduler: process-global singleton with a single worker
      thread that fires delayed refresh callbacks
    - ExpiresAtMillis: JWT exp claim parser for determining token expiry
      when expires_in is not provided in the token response
    - Base64Decode/Base64UrlDecode added to TransformUtil as public utilities
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant