go-sdk/auth
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jonathan Amsterdam e2cf95ca22
auth: add OAuth authenticating middleware for server (#261)
Add auth.RequireBearerToken and associated types.

This piece of middleware authenticates clients using OAuth 2.0, as
specified in the MCP spec.

For #237.

Usage:
```
st := mcp.NewStreamableServerTransport(...)
http.Handle(path, auth.RequireBearerToken(verifier, nil)(st.ServeHTTP))
```
2025-08-08 11:07:03 -04:00
..
auth.go auth: add OAuth authenticating middleware for server (#261) 2025-08-08 11:07:03 -04:00
auth_test.go auth: add OAuth authenticating middleware for server (#261) 2025-08-08 11:07:03 -04:00