Skip to content

Deprecate sandbox token server and use development token server - #366

Merged
MaxHeimbrock merged 12 commits into
mainfrom
max/deprecate-sandbox-token-server
Aug 4, 2026
Merged

Deprecate sandbox token server and use development token server#366
MaxHeimbrock merged 12 commits into
mainfrom
max/deprecate-sandbox-token-server

Conversation

@MaxHeimbrock

@MaxHeimbrock MaxHeimbrock commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Background

Deprecating "Sandbox" token source and renaming it to development token source.

Changes

  • Obsolete TokenSourceSandbox everywhere
  • Alias new TokenSourceDevelopment
  • Update docs

Newer changes:

  • Align with JS SDK to use static factory pattern

@MaxHeimbrock
MaxHeimbrock marked this pull request as ready for review July 31, 2026 12:25
MaxHeimbrock and others added 5 commits August 3, 2026 11:38
The concrete implementations are now private sealed classes nested in
the static TokenSource factory, so construction is only possible through
the factory methods, which return ITokenSourceFixed or
ITokenSourceConfigurable. The development token server is a
preconfigured endpoint source; the deprecated SandboxTokenServer method
forwards to it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
TokenSourceLiteral, TokenSourceCustom, TokenSourceEndpoint and
TokenSourceSandbox remain publicly constructible but are marked
[Obsolete], pointing to the TokenSource factory methods. They are thin
wrappers delegating to the private implementations, matching the
constructor signatures shipped in v2.0.0 (including the nested
CustomTokenFunction delegate and the TokenSourceSandbox inheritance
from TokenSourceEndpoint).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread Runtime/Scripts/TokenSource/TokenSource.cs

@xianshijing-lk xianshijing-lk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some questions, lgtm assuming you will be addressing them

Comment thread Runtime/Scripts/TokenSource/TokenSource.cs Outdated
Comment thread Runtime/Scripts/TokenSource/TokenSource.cs Outdated
Comment thread Runtime/Scripts/TokenSource/TokenSource.cs Outdated
/// </summary>
public static class TokenSource
{
public delegate Task<ConnectionDetails> CustomTokenFunction();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we make such CustomTokenFunction cancellable ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would need a lot more work and in JS we also don't offer that. Maybe something to keep in mind for the future or when customers request it.

Comment thread Runtime/Scripts/TokenSource/TokenSource.cs Outdated
Comment thread Runtime/Scripts/TokenSource/TokenSource.cs Outdated
…TP objects

- Make private token source fields readonly
- Copy endpoint headers into an IReadOnlyList at construction so later
  mutation of the caller's collection (e.g. the component's serialized
  list) no longer leaks into requests
- Dispose HttpRequestMessage and HttpResponseMessage via using var

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@MaxHeimbrock
MaxHeimbrock merged commit 6de59b7 into main Aug 4, 2026
11 checks passed
@MaxHeimbrock
MaxHeimbrock deleted the max/deprecate-sandbox-token-server branch August 4, 2026 12:53
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.

3 participants