Commit fb86c58
authored
mcp: include scopes supported in the www-authenticate header (#1608)
**Description**
Add the configured scopes to the `WWW-Authenticate` headers. At
initialization time, which is when the first authentication will occur,
we don't have enough information to provide a fine-grained list of
scopes, so the best we can do is to default to the ones defined in the
protected resource metadata.
**Related Issues/PRs (if applicable)**
Fixes #1578
The addition of the header on 403 requests is implemented in
#1482, but this issue can
be closed as soon as this PR is merged, because we'll be compatible with
the latest spec.
**Special notes for reviewers (if applicable)**
cc @zhaohuabing can you take a look?
Signed-off-by: Ignasi Barrera <[email protected]>1 parent 6d7059c commit fb86c58
File tree
3 files changed
+41
-2
lines changed- internal/controller
- tests/e2e
3 files changed
+41
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
326 | 331 | | |
327 | 332 | | |
328 | 333 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
654 | 654 | | |
655 | 655 | | |
656 | 656 | | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
657 | 681 | | |
658 | 682 | | |
659 | 683 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
154 | 159 | | |
155 | 160 | | |
156 | 161 | | |
| |||
320 | 325 | | |
321 | 326 | | |
322 | 327 | | |
323 | | - | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
324 | 334 | | |
325 | 335 | | |
326 | 336 | | |
0 commit comments