Commit 4795c6a
committed
feat(client): add initial access token support for Dynamic Client Registration
Add optional `dcrRegistrationAccessToken()` method to `OAuthClientProvider`
interface, enabling OAuth 2.0 Dynamic Client Registration with initial
access tokens per RFC 7591 Section 3.
When the authorization server requires pre-authorisation for client
registration, providers can implement this method to supply a Bearer
token that is included in the DCR request. When not implemented, open
registration continues as before (fully backward compatible).
The token resolution is kept in the provider (not the SDK) as it is
per-authorisation-server, following maintainer guidance from modelcontextprotocol#773.
Closes modelcontextprotocol#7721 parent 7ba58da commit 4795c6a
2 files changed
Lines changed: 79 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
354 | 367 | | |
355 | 368 | | |
356 | 369 | | |
| |||
730 | 743 | | |
731 | 744 | | |
732 | 745 | | |
| 746 | + | |
| 747 | + | |
733 | 748 | | |
734 | 749 | | |
735 | 750 | | |
736 | 751 | | |
| 752 | + | |
737 | 753 | | |
738 | 754 | | |
739 | 755 | | |
| |||
1684 | 1700 | | |
1685 | 1701 | | |
1686 | 1702 | | |
| 1703 | + | |
1687 | 1704 | | |
1688 | 1705 | | |
1689 | 1706 | | |
1690 | 1707 | | |
1691 | 1708 | | |
| 1709 | + | |
1692 | 1710 | | |
1693 | 1711 | | |
1694 | 1712 | | |
| |||
1704 | 1722 | | |
1705 | 1723 | | |
1706 | 1724 | | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
1707 | 1733 | | |
1708 | 1734 | | |
1709 | | - | |
1710 | | - | |
1711 | | - | |
| 1735 | + | |
1712 | 1736 | | |
1713 | 1737 | | |
1714 | 1738 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2132 | 2132 | | |
2133 | 2133 | | |
2134 | 2134 | | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
| 2168 | + | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
| 2172 | + | |
| 2173 | + | |
| 2174 | + | |
| 2175 | + | |
| 2176 | + | |
| 2177 | + | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
| 2183 | + | |
| 2184 | + | |
| 2185 | + | |
| 2186 | + | |
2135 | 2187 | | |
2136 | 2188 | | |
2137 | 2189 | | |
| |||
0 commit comments