Skip to content

Commit 7b134f1

Browse files
committed
Rm scope scheck in auth enforcement
1 parent 71ef268 commit 7b134f1

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/stac_auth_proxy/middleware/EnforceAuthMiddleware.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -125,19 +125,6 @@ def validated_user(
125125
headers={"WWW-Authenticate": "Bearer"},
126126
) from e
127127

128-
# Validate scopes (if required)
129-
for scope in required_scopes.scopes:
130-
if scope not in payload["scope"]:
131-
if auto_error:
132-
raise HTTPException(
133-
status_code=status.HTTP_401_UNAUTHORIZED,
134-
detail="Not enough permissions",
135-
headers={
136-
"WWW-Authenticate": f'Bearer scope="{required_scopes.scope_str}"'
137-
},
138-
)
139-
return None
140-
141128
return payload
142129

143130

0 commit comments

Comments
 (0)