From 1557db0cea478a3689bb714bc68db3230009ffa8 Mon Sep 17 00:00:00 2001 From: langchain-infra Date: Tue, 5 May 2026 10:26:21 -0400 Subject: [PATCH] Expose profile OAuth refresh token --- .../src/main/kotlin/com/langchain/smith/core/ProfileConfig.kt | 2 ++ .../test/kotlin/com/langchain/smith/core/ProfileConfigTest.kt | 1 + 2 files changed, 3 insertions(+) diff --git a/langsmith-java-core/src/main/kotlin/com/langchain/smith/core/ProfileConfig.kt b/langsmith-java-core/src/main/kotlin/com/langchain/smith/core/ProfileConfig.kt index a413a4e7..e7297678 100644 --- a/langsmith-java-core/src/main/kotlin/com/langchain/smith/core/ProfileConfig.kt +++ b/langsmith-java-core/src/main/kotlin/com/langchain/smith/core/ProfileConfig.kt @@ -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) diff --git a/langsmith-java-core/src/test/kotlin/com/langchain/smith/core/ProfileConfigTest.kt b/langsmith-java-core/src/test/kotlin/com/langchain/smith/core/ProfileConfigTest.kt index f60d948b..8493792a 100644 --- a/langsmith-java-core/src/test/kotlin/com/langchain/smith/core/ProfileConfigTest.kt +++ b/langsmith-java-core/src/test/kotlin/com/langchain/smith/core/ProfileConfigTest.kt @@ -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()