rust-sdk/examples/servers/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tanish Desai f20ed202af
Add SEP-991 (CIMD) support for URL-based client IDs (#570)
* feat(auth): add cimd support for SEP-991

add cimd support for url-based client ids

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

* test(auth): add unit tests for is_https_url helper

Add test coverage for is_https_url helper to validate HTTPS scheme, non-root paths,
and reject http, javascript, data schemes, and invalid inputs per SEP-991 requirements.

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

* feat(example): add CIMD OAuth server for SEP-991 testing

Implements a new server example (servers_cimd_auth_streamhttp) that
demonstrates CIMD (Client ID Metadata Document) support for URL-based
client IDs. The server validates client_id URLs, fetches and validates
client metadata documents, and provides OAuth 2.0 authorization endpoints
with MCP integration for end-to-end testing.

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

* fix(oauth): add CORS headers to token endpoint

Add CORS headers to token endpoint to allow cross-origin requests from browsers
during OAuth authorization code exchange flow.

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

* refactor: improve is_https_url function and consolidate tests

- Improve is_https_url function formatting and readability
- Merge all test cases into single test_is_https_url_scenarios function
- Add missing test case for "https://" URL

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

* refactor: use map_err instead of match for error handling in auth.rs

Replace the verbose match statement with
map_err for more idiomatic

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

* feat: add client-metadata.json

Add client metadata file for SEP-991 CIMD
authentication support

Signed-off-by: tanish111 <tanishdesai37@gmail.com>

---------

Signed-off-by: tanish111 <tanishdesai37@gmail.com>
2025-12-10 08:55:38 -05:00
..
common Implements outputSchema validation (#566) 2025-12-08 16:13:19 -05:00
html feat!: remove SSE transport support (#562) 2025-12-01 20:40:13 -05:00
calculator_stdio.rs Implements outputSchema validation (#566) 2025-12-08 16:13:19 -05:00
cimd_auth_streamhttp.rs Add SEP-991 (CIMD) support for URL-based client IDs (#570) 2025-12-10 08:55:38 -05:00
completion_stdio.rs feat: implement context-aware completion (MCP 2025-06-18) (#396) 2025-09-08 14:44:49 +08:00
complex_auth_streamhttp.rs fix(oauth): rfc8414 should judement the response_types (#485) 2025-12-09 11:18:18 -05:00
counter_hyper_streamable_http.rs feat: allow failable service creation in streamable HTTP tower service (#244) 2025-06-16 01:13:35 +08:00
counter_stdio.rs fix(examples): add servers in examples's readme (#229) 2025-05-26 21:00:49 +08:00
counter_streamhttp.rs fix(streamable-http): gracefully shutdown while client connected (#494) 2025-12-02 09:22:52 +08:00
elicitation_stdio.rs feat: add type-safe elicitation schema support (#465) (#466) 2025-10-15 17:55:10 +08:00
memory_stdio.rs fix(examples): add servers in examples's readme (#229) 2025-05-26 21:00:49 +08:00
progress_demo.rs feat!: remove SSE transport support (#562) 2025-12-01 20:40:13 -05:00
prompt_stdio.rs feat: Add prompt support (#351) 2025-08-21 11:22:19 +08:00
sampling_stdio.rs feat(meta): add _meta field to prompts, resources and paginated result (#558) 2025-12-04 09:38:47 +08:00
simple_auth_streamhttp.rs feat!: remove SSE transport support (#562) 2025-12-01 20:40:13 -05:00
structured_output.rs feat: Add prompt support (#351) 2025-08-21 11:22:19 +08:00