@@ -69,38 +69,11 @@ ICEBERG_REST_EXPORT Result<OAuthTokenResponse> FetchToken(
6969 const std::string& client_secret, const std::string& scope, AuthSession& session);
7070
7171// / \brief Refresh an expired access token using a refresh_token grant.
72- // /
73- // / Sends a POST request with form-encoded body to the token endpoint:
74- // / grant_type=refresh_token&refresh_token=...&client_id=...&scope=...
75- // /
76- // / \param client HTTP client to use for the request.
77- // / \param token_endpoint Full URL of the OAuth2 token endpoint.
78- // / \param client_id OAuth2 client ID (may be empty if not required by server).
79- // / \param refresh_token The refresh token from a previous token response.
80- // / \param scope OAuth2 scope to request.
81- // / \param session Auth session for the request.
82- // / \return A new token response with a fresh access_token, or an error.
8372ICEBERG_REST_EXPORT Result<OAuthTokenResponse> RefreshToken (
8473 HttpClient& client, const std::string& token_endpoint, const std::string& client_id,
8574 const std::string& refresh_token, const std::string& scope, AuthSession& session);
8675
8776// / \brief Exchange a token for a scoped token using RFC 8693 Token Exchange.
88- // /
89- // / Sends a POST request with form-encoded body to the token endpoint:
90- // / grant_type=urn:ietf:params:oauth:grant-type:token-exchange
91- // / &subject_token=...&subject_token_type=...&scope=...
92- // /
93- // / Used by TableSession and ContextualSession to obtain table/context-specific
94- // / tokens from a parent session's access token.
95- // /
96- // / \param client HTTP client to use for the request.
97- // / \param token_endpoint Full URL of the OAuth2 token endpoint.
98- // / \param subject_token The access token to exchange.
99- // / \param subject_token_type Token type URI (typically
100- // / "urn:ietf:params:oauth:token-type:access_token").
101- // / \param scope OAuth2 scope to request for the exchanged token.
102- // / \param session Auth session for the request.
103- // / \return A new token response with a scoped access_token, or an error.
10477ICEBERG_REST_EXPORT Result<OAuthTokenResponse> ExchangeToken (
10578 HttpClient& client, const std::string& token_endpoint,
10679 const std::string& subject_token, const std::string& subject_token_type,
0 commit comments