Skip to content

Commit 976688b

Browse files
committed
refactor (Framework): change dirac-log[in|out] API & use certificates locally
fix: deepcopy to copy fix (FS): fix dirac-login store proxy in default dir fix: provide multiple scopes
1 parent d947522 commit 976688b

File tree

3 files changed

+300
-141
lines changed

3 files changed

+300
-141
lines changed

src/DIRAC/FrameworkSystem/private/authorization/AuthServer.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ def generateProxyOrToken(
144144
# Try to return user proxy if proxy scope present in the authorization request
145145
if not isDownloadablePersonalProxy():
146146
raise OAuth2Error("You can't get proxy, configuration(downloadablePersonalProxy) not allow to do that.")
147-
sLog.debug(
148-
"Try to query %s@%s proxy%s" % (user, group, ("with lifetime:%s" % lifetime) if lifetime else "")
147+
self.log.debug(
148+
"Try to query %s@%s proxy%s" % (user, group, (" with lifetime:%s" % lifetime) if lifetime else "")
149149
)
150150
# Get user DNs
151151
result = getDNForUsername(userName)
@@ -327,7 +327,9 @@ def create_json_request(self, request):
327327
def validate_requested_scope(self, scope, state=None):
328328
"""See :func:`authlib.oauth2.rfc6749.authorization_server.validate_requested_scope`"""
329329
# We also consider parametric scope containing ":" charter
330-
extended_scope = list_to_scope([re.sub(r":.*$", ":", s) for s in scope_to_list(scope or "")])
330+
extended_scope = list_to_scope(
331+
[re.sub(r":.*$", ":", s) for s in scope_to_list((scope or "").replace("+", " "))]
332+
)
331333
super(AuthServer, self).validate_requested_scope(extended_scope, state)
332334

333335
def handle_response(self, status_code=None, payload=None, headers=None, newSession=None, delSession=None):

0 commit comments

Comments
 (0)