mirror of
https://github.com/langchain-ai/langsmith-java.git
synced 2026-08-26 18:17:05 -04:00
Expose profile OAuth refresh token
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user