Expose profile OAuth refresh token

This commit is contained in:
langchain-infra
2026-05-05 10:26:21 -04:00
parent 3677815524
commit 1557db0cea
2 changed files with 3 additions and 0 deletions
@@ -25,6 +25,7 @@ internal data class ProfileClientConfig(
val apiKey: String?,
val tenantId: String?,
val oauthAccessToken: String?,
val oauthRefreshToken: String?,
val profileAuth: ProfileAuth?,
)
@@ -62,6 +63,7 @@ internal fun loadProfileClientConfig(
apiKey = text(profile["api_key"]),
tenantId = text(profile["workspace_id"]),
oauthAccessToken = oauthAccessToken,
oauthRefreshToken = oauthRefreshToken,
profileAuth =
if (oauthAccessToken != null || oauthRefreshToken != null) {
ProfileAuth(jsonMapper, clock, configPath, config, profile)
@@ -147,6 +147,7 @@ internal class ProfileConfigTest {
)
assertThat(config?.oauthAccessToken).isEqualTo("old-access-token")
assertThat(config?.oauthRefreshToken).isEqualTo("old-refresh-token")
assertThat(requestBody).isEmpty()
val authHeader = config?.profileAuth?.authHeader()