update id
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from http import HTTPStatus, client
|
||||
from http import HTTPStatus
|
||||
from http.cookies import SimpleCookie
|
||||
|
||||
import jwt
|
||||
@@ -33,13 +33,11 @@ def authorize():
|
||||
request=router.current_event,
|
||||
end_user=sub,
|
||||
)
|
||||
req_scopes = set(scope_to_list(grant.request.payload.scope))
|
||||
user_scopes = set(scope_to_list(session_scope)) if session_scope else set()
|
||||
client_scopes = set(scope_to_list(grant.client.scope))
|
||||
user_scopes = set(scope_to_list(session_scope)) if session_scope else set()
|
||||
|
||||
if not req_scopes.issubset(
|
||||
client_scopes
|
||||
& (user_scopes | {'openid', 'email', 'profile', 'offline_access'})
|
||||
if not client_scopes.issubset(
|
||||
user_scopes | {'openid', 'email', 'profile', 'offline_access'}
|
||||
):
|
||||
raise errors.InvalidScopeError(status_code=HTTPStatus.UNAUTHORIZED)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user