auth: propagate OAuth token lifetime - #431
Merged
Merged
Conversation
Add optional expiresIn semantics to authenticate, constrain it to positive whole seconds in generated schemas, and regenerate every language client. Clarify expired credential handling and document the OAuth mapping. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: None
What changed in this PR
Adds optional OAuth token lifetime propagation to authentication while preserving backward compatibility.
Changes:
- Adds
AuthenticateParams.expiresInwith positive-integer schema constraints. - Regenerates all language clients and schemas.
- Documents token renewal and expiry handling.
| File | Description |
|---|---|
types/common/notifications.ts |
Clarifies expired-token handling. |
types/common/commands.ts |
Defines optional expiresIn. |
scripts/generate-json-schema.ts |
Supports numeric schema constraints. |
scripts/generate-json-schema.test.ts |
Tests generated lifetime constraints. |
schema/notifications.schema.json |
Updates authentication guidance. |
schema/errors.schema.json |
Adds constrained expiresIn. |
schema/commands.schema.json |
Adds constrained expiresIn. |
docs/specification/authentication.md |
Documents lifetime forwarding and renewal. |
docs/.changes/20260901-authenticate-token-lifetime.json |
Records the protocol addition. |
clients/swift/AgentHostProtocol/Sources/AgentHostProtocol/Generated/Notifications.generated.swift |
Updates expiry documentation. |
clients/swift/AgentHostProtocol/Sources/AgentHostProtocol/Generated/Commands.generated.swift |
Exposes expiresIn. |
clients/rust/crates/ahp-types/src/notifications.rs |
Updates expiry documentation. |
clients/rust/crates/ahp-types/src/commands.rs |
Exposes expires_in. |
clients/kotlin/src/main/kotlin/com/microsoft/agenthostprotocol/generated/Notifications.generated.kt |
Updates expiry documentation. |
clients/kotlin/src/main/kotlin/com/microsoft/agenthostprotocol/generated/Commands.generated.kt |
Exposes expiresIn. |
clients/go/ahptypes/notifications.generated.go |
Updates expiry documentation. |
clients/go/ahptypes/commands.generated.go |
Exposes ExpiresIn. |
clients/dotnet/src/AgentHostProtocol.Abstractions/Generated/Notifications.generated.cs |
Updates expiry documentation. |
clients/dotnet/src/AgentHostProtocol.Abstractions/Generated/Commands.generated.cs |
Exposes ExpiresIn. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Use an explicit @integer schema annotation for expiresIn while retaining the positive minimum constraint. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
TylerLeonhardt
marked this pull request as ready for review
September 1, 2026 18:50
TylerLeonhardt
enabled auto-merge (squash)
September 1, 2026 18:50
Connor Peet (connor4312)
approved these changes
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
expiresIntoAuthenticateParamsusing OAuth 2.0expires_insemanticsexpiredchallengeTesting
npm run generatenpx tsx --test scripts/generate-json-schema.test.tsnpm test(445 tests passed, 100% reducer branch coverage)