Skip to content

Commit 89d1e3f

Browse files
committed
fix: fixed bugs introduced in earlier releases
1 parent 430cdca commit 89d1e3f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/DIRAC/FrameworkSystem/Service/TokenManagerHandler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def export_getToken(
259259
result = self.__checkProperties(dn, userGroup)
260260
if result["OK"]:
261261
# refresh token with requested scope
262-
result = idpObj.refreshToken(tokens.get("refresh_token"))
262+
result = idpObj.refreshToken(tokens.get("refresh_token"), group=userGroup, scope=scope)
263263
if result["OK"]:
264264
# caching new tokens
265265
self.__tokensCache.add(

src/DIRAC/Resources/IdProvider/Utilities.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ def getIdProviderIdentifierFromIssuerAndClientID(issuer, clientID):
3939

4040
for identifier in result["Value"]:
4141
testedClientID = gConfig.getValue(f"/Resources/IdProviders/{identifier}/client_id")
42-
if testedClientID and testedClientID == clientID:
42+
# clientID is not always available, e.g. in case of a token of particular user
43+
if not clientID or (testedClientID and testedClientID == clientID):
4344
# Found the client ID but need to check the issuer
4445
# 2 different issuers could theoretically have a same client ID
4546
testedIssuer = gConfig.getValue(f"/Resources/IdProviders/{identifier}/issuer")

0 commit comments

Comments
 (0)