Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 18, 2023
1 parent 5bb4bac commit ab36326
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions social_core/backends/wlcg.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from .oauth import BaseOAuth2
from urllib.parse import urlencode

Check warning on line 1 in social_core/backends/wlcg.py

View check run for this annotation

Codecov / codecov/patch

social_core/backends/wlcg.py#L1

Added line #L1 was not covered by tests

from .oauth import BaseOAuth2

Check warning on line 3 in social_core/backends/wlcg.py

View check run for this annotation

Codecov / codecov/patch

social_core/backends/wlcg.py#L3

Added line #L3 was not covered by tests


class WLCGOAuth2(BaseOAuth2):
"""
WLCG IAM Authentication Backend
Expand All @@ -25,14 +27,12 @@ def get_user_details(self, response):
"email": response.get("email"),
"fullname": fullname,
"first_name": first_name,
"last_name": last_name
"last_name": last_name,
}


def user_data(self, access_token, *args, **kwargs):

Check warning on line 33 in social_core/backends/wlcg.py

View check run for this annotation

Codecov / codecov/patch

social_core/backends/wlcg.py#L33

Added line #L33 was not covered by tests
"""Loads user data from service"""
url = 'https://wlcg.cloud.cnaf.infn.it/userinfo?' + urlencode({
'access_token': access_token
})
url = "https://wlcg.cloud.cnaf.infn.it/userinfo?" + urlencode(

Check warning on line 35 in social_core/backends/wlcg.py

View check run for this annotation

Codecov / codecov/patch

social_core/backends/wlcg.py#L35

Added line #L35 was not covered by tests
{"access_token": access_token}
)
return self.get_json(url)

Check warning on line 38 in social_core/backends/wlcg.py

View check run for this annotation

Codecov / codecov/patch

social_core/backends/wlcg.py#L38

Added line #L38 was not covered by tests

0 comments on commit ab36326

Please sign in to comment.