explicitly support async oauth_client_allowed_scopes

This commit is contained in:
Min RK
2022-08-02 13:33:43 +02:00
parent a35a2ec8b7
commit 6a470b44e7
2 changed files with 8 additions and 2 deletions

View File

@@ -666,11 +666,12 @@ class User:
client_id = spawner.oauth_client_id
oauth_provider = self.settings.get('oauth_provider')
if oauth_provider:
allowed_scopes = await spawner._get_oauth_client_allowed_scopes()
oauth_client = oauth_provider.add_client(
client_id,
api_token,
url_path_join(self.url, url_escape_path(server_name), 'oauth_callback'),
allowed_scopes=spawner._get_oauth_client_allowed_scopes(),
allowed_scopes=allowed_scopes,
description="Server at %s"
% (url_path_join(self.base_url, server_name) + '/'),
)