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

@ -23,6 +23,10 @@ tracing = { version = "0.1" }
tokio-util = { version = "0.7" }
pin-project-lite = "0.2"
paste = { version = "1", optional = true }
# oauth2 support
oauth2 = { version = "5.0", optional = true }
# for auto generate schema
schemars = { version = "0.8", optional = true }
@ -70,6 +74,8 @@ transport-sse-server = [
]
# transport-ws = ["transport-io", "dep:tokio-tungstenite"]
tower = ["dep:tower-service"]
auth = ["dep:oauth2", "dep:reqwest", "dep:url"]
[dev-dependencies]
tokio = { version = "1", features = ["full"] }
schemars = { version = "0.8" }