1- # OAuth 2.0 Test Server
1+ <p align =" center " >
2+ <img width =" 96 " src =" ./docs/oauth2-test-server.png " alt =" OAuth 2.0 Test Server Logo " width =" 300 " >
3+ </p >
4+ <h1 align =" center " >OAuth 2.0 Test Server</h1 >
5+
6+ [ <img alt =" crates.io " src =" https://img.shields.io/crates/v/oauth2-test-server?style=for-the-badge&logo=rust&color=FE965D " height =" 22 " >] ( https://crates.io/crates/oauth2-test-server )
7+ [ <img alt =" docs.rs " src =" https://img.shields.io/badge/docs.rs-oauth_2.0_test_server-0ECDAB?style=for-the-badge&logo=docs.rs " height =" 22 " >] ( https://docs.rs/oauth2-test-server )
8+ [ <img alt =" build status " src =" https://img.shields.io/github/actions/workflow/status/rust-mcp-stack/oauth2-test-server/ci.yml?style=for-the-badge " height =" 22 " >
9+ ] ( https://github.com/rust-mcp-stack/oauth2-test-server/actions/workflows/ci.yml )
10+
211
312A fast, fully configurable, in-memory OAuth 2.0 + OpenID Connect authorization server for testing, zero-HTTP mode and DCR support for testing auth flow in MCP Servers and MCP Clients.
413
@@ -154,20 +163,20 @@ You can run the server directly from your terminal - no code required.
154163 < tbody>
155164 < tr>
156165 < td> Apple Silicon macOS< /td>
157- < td>
158- < a href=" https://github.com/rust-mcp-stack/oauth2-test-server/releases/download/v0.2.1/oauth2-test-server-aarch64-apple-darwin.tar.gz " > oauth2-test-server-aarch64-apple-darwin.tar.gz < /a>
166+ < td>
167+ < a href=" https://github.com/rust-mcp-stack/oauth2-test-server/releases/download/v0.2.1/oauth2-test-server-aarch64-apple-darwin.tar.xz " > oauth2-test-server-aarch64-apple-darwin.tar.xz < /a>
159168 < /td>
160169 < td>
161- < a href=" https://github.com/rust-mcp-stack/oauth2-test-server/releases/download/v0.2.1/oauth2-test-server-aarch64-apple-darwin.tar.gz .sha256" > checksum< /a>
170+ < a href=" https://github.com/rust-mcp-stack/oauth2-test-server/releases/download/v0.2.1/oauth2-test-server-aarch64-apple-darwin.tar.xz .sha256" > checksum< /a>
162171 < /td>
163172 < /tr>
164173 < tr>
165174 < td> Intel macOS< /td>
166175 < td>
167- < a href=" https://github.com/rust-mcp-stack/oauth2-test-server/releases/download/v0.2.1/oauth2-test-server-x86_64-apple-darwin.tar.gz " > oauth2-test-server-x86_64-apple-darwin.tar.gz < /a>
176+ < a href=" https://github.com/rust-mcp-stack/oauth2-test-server/releases/download/v0.2.1/oauth2-test-server-x86_64-apple-darwin.tar.xz " > oauth2-test-server-x86_64-apple-darwin.tar.xz < /a>
168177 < /td>
169178 < td>
170- < a href=" https://github.com/rust-mcp-stack/oauth2-test-server/releases/download/v0.2.1/oauth2-test-server-x86_64-apple-darwin.tar.gz .sha256" > checksum< /a>
179+ < a href=" https://github.com/rust-mcp-stack/oauth2-test-server/releases/download/v0.2.1/oauth2-test-server-x86_64-apple-darwin.tar.xz .sha256" > checksum< /a>
171180 < /td>
172181 < /tr>
173182 < tr>
@@ -191,19 +200,19 @@ You can run the server directly from your terminal - no code required.
191200 < tr>
192201 < td> ARM64 Linux< /td>
193202 < td>
194- < a href=" https://github.com/rust-mcp-stack/oauth2-test-server/releases/download/v0.2.1/oauth2-test-server-aarch64-unknown-linux-gnu.tar.gz " > oauth2-test-server-aarch64-unknown-linux-gnu.tar.gz < /a>
203+ < a href=" https://github.com/rust-mcp-stack/oauth2-test-server/releases/download/v0.2.1/oauth2-test-server-aarch64-unknown-linux-gnu.tar.xz " > oauth2-test-server-aarch64-unknown-linux-gnu.tar.xz < /a>
195204 < /td>
196205 < td>
197- < a href=" https://github.com/rust-mcp-stack/oauth2-test-server/releases/download/v0.2.1/oauth2-test-server-aarch64-unknown-linux-gnu.tar.gz .sha256" > checksum< /a>
206+ < a href=" https://github.com/rust-mcp-stack/oauth2-test-server/releases/download/v0.2.1/oauth2-test-server-aarch64-unknown-linux-gnu.tar.xz .sha256" > checksum< /a>
198207 < /td>
199208 < /tr>
200209 < tr>
201210 < td> x64 Linux< /td>
202211 < td>
203- < a href=" https://github.com/rust-mcp-stack/oauth2-test-server/releases/download/v0.2.1/oauth2-test-server-x86_64-unknown-linux-gnu.tar.gz " > oauth2-test-server-x86_64-unknown-linux-gnu.tar.gz < /a>
212+ < a href=" https://github.com/rust-mcp-stack/oauth2-test-server/releases/download/v0.2.1/oauth2-test-server-x86_64-unknown-linux-gnu.tar.xz " > oauth2-test-server-x86_64-unknown-linux-gnu.tar.xz < /a>
204213 < /td>
205214 < td>
206- < a href=" https://github.com/rust-mcp-stack/oauth2-test-server/releases/download/v0.2.1/oauth2-test-server-x86_64-unknown-linux-gnu.tar.gz .sha256" > checksum< /a>
215+ < a href=" https://github.com/rust-mcp-stack/oauth2-test-server/releases/download/v0.2.1/oauth2-test-server-x86_64-unknown-linux-gnu.tar.xz .sha256" > checksum< /a>
207216 < /td>
208217 < /tr>
209218 < /tbody>
@@ -434,7 +443,29 @@ async fn with_config() {
434443```
435444
436445
437- ** ⚠️ For testing/development only**
438- - In-memory storage (not persistent)
439- - No rate limiting or attack protection
440- - Use in test suites, CI/CD, local development
446+ ## Migration Guide
447+
448+ ### Upgrading from 0.1.x to 0.2.x
449+
450+ ** 1. Methods are now ` async ` ** - Add ` .await ` :
451+ ``` rust
452+ // Before (0.1.x)
453+ let client = server . register_client (json! ({... }));
454+ let token = server . generate_token (& client , options );
455+
456+ // After (0.2.x)
457+ let client = server . register_client (json! ({... })). await ;
458+ let token = server . generate_token (& client , options ). await ;
459+ ```
460+
461+ ** 2. Accessor methods return ` Vec ` instead of ` Arc<RwLock<HashMap>> ` ** :
462+ ``` rust
463+ // Before (0.1.x)
464+ assert_eq! (server . clients (). read (). iter (). len (), 1 );
465+
466+ // After (0.2.x)
467+ assert_eq! (server . clients (). await . len (), 1 );
468+
469+ // Or for mutation (reset state between tests):
470+ server . clear_all (). await ;
471+ ```
0 commit comments