Fix advertised scopes for oauth protected resources

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
This commit is contained in:
Ludovic Vielle
2026-06-25 10:21:47 +02:00
parent 38b6bbf4b5
commit 2ba8464d4e
6 changed files with 12 additions and 9 deletions

View File

@@ -31,7 +31,7 @@ type ProtectedResourceMetadata struct {
func NewProtectedResourceMetadata(
resource uri.URI,
authorizationServer uri.URI,
registeredScopes []coredata.OAuth2Scope,
writeScopes []coredata.OAuth2Scope,
) *ProtectedResourceMetadata {
return &ProtectedResourceMetadata{
Resource: resource,
@@ -39,6 +39,6 @@ func NewProtectedResourceMetadata(
BearerMethodsSupported: []string{
"header",
},
ScopesSupported: protectedResourceScopes(registeredScopes),
ScopesSupported: protectedResourceScopes(writeScopes),
}
}