Skip to content

Commit

Permalink
fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-XT committed Jun 13, 2024
1 parent 19aca0a commit becb047
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion sso/fitbit.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ def __init__(
self.user_info = self.get_user_info()

def get_new_token(self):
decoded_token = base64.b64encode(f"{self.client_id}:{self.client_secret}".encode()).decode()
response = requests.post(
"https://api.fitbit.com/oauth2/token",
headers={
"Authorization": f"Basic {base64.b64encode(f'{self.client_id}:{self.client_secret}'.encode()).decode()}",
"Authorization": f"Basic {decoded_token}",
"Content-Type": "application/x-www-form-urlencoded",
},
data={
Expand Down
5 changes: 4 additions & 1 deletion sso/formstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
- formstack:write
"""


class FormstackSSO:
def __init__(
self,
Expand Down Expand Up @@ -74,7 +75,9 @@ def get_user_info(self):
)

def send_form_submission(self, form_id, submission_data):
form_submission_url = f"https://www.formstack.com/api/v2/form/{form_id}/submission.json"
form_submission_url = (
f"https://www.formstack.com/api/v2/form/{form_id}/submission.json"
)
headers = {
"Authorization": f"Bearer {self.access_token}",
"Content-Type": "application/json",
Expand Down
3 changes: 2 additions & 1 deletion sso/paypal.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ def __init__(
self.user_info = self.get_user_info()

def get_new_token(self):
token = base64.b64encode(f"{self.client_id}:{self.client_secret}".encode()).decode()
response = requests.post(
"https://api.paypal.com/v1/oauth2/token",
headers={
"Authorization": f"Basic {base64.b64encode(f'{self.client_id}:{self.client_secret}'.encode()).decode()}",
"Authorization": f"Basic {token}",
"Content-Type": "application/x-www-form-urlencoded",
},
data={
Expand Down

0 comments on commit becb047

Please sign in to comment.