Skip to content

Commit

Permalink
Fixes from running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Apr 25, 2023
1 parent 19289d1 commit 8a5a8b4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion oauthenticator/bitbucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ async def update_auth_model(self, auth_model):
auth_model["admin"] = True

if self.allowed_teams:
user_teams = self._fetch_user_teams(access_token, token_type)
user_teams = await self._fetch_user_teams(access_token, token_type)
auth_model["auth_state"]["user_teams"] = user_teams

return auth_model
Expand Down
3 changes: 1 addition & 2 deletions oauthenticator/cilogon.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,11 @@ def _validate_allowed_idps(self, proposal):
)

def user_info_to_username(self, user_info):
selected_idp = user_info["idp"]

username_claims = [self.username_claim]
if self.additional_username_claims:
username_claims.extend(self.additional_username_claims)
if self.allowed_idps:
selected_idp = user_info["idp"]
# The username_claim which should be used for this idp
username_claims = [
self.allowed_idps[selected_idp]["username_derivation"]["username_claim"]
Expand Down
2 changes: 1 addition & 1 deletion oauthenticator/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def get_user_groups(self, user_info):
if callable(self.claim_groups_key):
return set(self.claim_groups_key(user_info))
try:
return reduce(dict.get, self.claim_groups_key.split("."), user_info)
return set(reduce(dict.get, self.claim_groups_key.split("."), user_info))
except TypeError:
self.log.error(
f"The claim_groups_key {self.claim_groups_key} does not exist in the user token"
Expand Down
2 changes: 1 addition & 1 deletion oauthenticator/oauth2.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ def build_auth_state_dict(self, token_info, user_info):
self.user_auth_state_key: user_info,
}

async def update_auth_model(self, username, auth_model):
async def update_auth_model(self, auth_model):
"""
Updates and returns the `auth_model` dict.
Expand Down

0 comments on commit 8a5a8b4

Please sign in to comment.