pomerium/internal/oauth21
Denis Mishin 777b3b12d2
mcp: client registration/token fixes (#5649)
## Summary

Fixes to MCP code registration and token requests. 

1. ease some requirements on fields that are RECOMMENDED 
2. fill in defaults
3. store both request and response in the client registration
4. check client secret in the /token request

## Related issues

- Fixes
https://linear.app/pomerium/issue/ENG-2462/mcp-ignore-unknown-grant-types-in-the-client-registration
- Fixes
https://linear.app/pomerium/issue/ENG-2461/mcp-support-client-secret-in-dynamic-client-registration
 
## User Explanation

<!-- How would you explain this change to the user? If this
change doesn't create any user-facing changes, you can leave
this blank. If filled out, add the `docs` label -->

## Checklist

- [x] reference any related issues
- [x] updated unit tests
- [x] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [ ] ready for review
2025-06-11 11:28:24 -04:00
..
gen mcp: client registration/token fixes (#5649) 2025-06-11 11:28:24 -04:00
proto mcp: client registration/token fixes (#5649) 2025-06-11 11:28:24 -04:00
authorize.go mcp: client registration/token fixes (#5649) 2025-06-11 11:28:24 -04:00
buf.gen.yaml mcp: token: handle authorization_code request (pt1) (#5587) 2025-04-28 14:09:22 -04:00
buf.lock mcp: client registration/token fixes (#5649) 2025-06-11 11:28:24 -04:00
buf.yaml mcp: authorize request (pt1) (#5585) 2025-04-24 14:59:12 -04:00
error.go mcp: authorize request (pt1) (#5585) 2025-04-24 14:59:12 -04:00
generate.go mcp: authorize request (pt1) (#5585) 2025-04-24 14:59:12 -04:00
parse.go mcp: authorize request (pt1) (#5585) 2025-04-24 14:59:12 -04:00
pkce.go mcp: token: handle authorization_code request (pt1) (#5587) 2025-04-28 14:09:22 -04:00
pkce_test.go mcp: token: handle authorization_code request (pt1) (#5587) 2025-04-28 14:09:22 -04:00
token.go mcp: client registration/token fixes (#5649) 2025-06-11 11:28:24 -04:00
token_test.go mcp: client registration/token fixes (#5649) 2025-06-11 11:28:24 -04:00
validate_client.go mcp: client registration/token fixes (#5649) 2025-06-11 11:28:24 -04:00
validate_client_test.go mcp: client registration/token fixes (#5649) 2025-06-11 11:28:24 -04:00
validate_token_test.go mcp: token: handle authorization_code request (pt1) (#5587) 2025-04-28 14:09:22 -04:00