chore: add oauth2 support (#130)

1.add oauth2 server and client example
2.add oauth2 impl in sse
3.add auth doc 
Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
This commit is contained in:
jokemanfire 2025-04-29 17:52:59 +08:00 • committed by GitHub
commit afb8a905e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,6 +56,11 @@ pub mod sse;
#[cfg(feature = "transport-sse")]
pub use sse::SseTransport;
#[cfg(all(feature = "transport-sse", feature = "auth"))]
pub mod sse_auth;
#[cfg(all(feature = "transport-sse", feature = "auth"))]
pub use sse_auth::{AuthorizedSseClient, create_authorized_transport};
// #[cfg(feature = "tower")]
// pub mod tower;
@ -64,6 +69,11 @@ pub mod sse_server;
#[cfg(feature = "transport-sse-server")]
pub use sse_server::SseServer;
#[cfg(feature = "auth")]
pub mod auth;
#[cfg(feature = "auth")]
pub use auth::{AuthError, AuthorizationManager, AuthorizationSession, AuthorizedHttpClient};
// #[cfg(feature = "transport-ws")]
// pub mod ws;