Skip to content

Commit

Permalink
remove excess argument to SessionWithHeaderRedirection
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfromearth committed Feb 16, 2024
1 parent 2365c5c commit a451eca
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions earthaccess/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,7 @@ def get_s3_credentials(
A Python dictionary with the temporary AWS S3 credentials.
"""
if self.authenticated:
session = SessionWithHeaderRedirection(
self.username, self.password, self.earthdata_environment
)
session = SessionWithHeaderRedirection(self.username, self.password)
if endpoint is None:
auth_url = self._get_cloud_auth_url(
daac_shortname=daac, provider=provider
Expand Down Expand Up @@ -362,9 +360,7 @@ def _get_credentials(
return self.authenticated

def _get_user_tokens(self, username: str, password: str) -> Any:
session = SessionWithHeaderRedirection(
username, password, self.earthdata_environment
)
session = SessionWithHeaderRedirection(username, password)
auth_resp = session.get(
self.EDL_GET_TOKENS_URL,
headers={
Expand All @@ -375,9 +371,7 @@ def _get_user_tokens(self, username: str, password: str) -> Any:
return auth_resp

def _generate_user_token(self, username: str, password: str) -> Any:
session = SessionWithHeaderRedirection(
username, password, self.earthdata_environment
)
session = SessionWithHeaderRedirection(username, password)
auth_resp = session.post(
self.EDL_GENERATE_TOKENS_URL,
headers={
Expand All @@ -389,9 +383,7 @@ def _generate_user_token(self, username: str, password: str) -> Any:

def _revoke_user_token(self, token: str) -> bool:
if self.authenticated:
session = SessionWithHeaderRedirection(
self.username, self.password, self.earthdata_environment
)
session = SessionWithHeaderRedirection(self.username, self.password)
auth_resp = session.post(
self.EDL_REVOKE_TOKEN,
params={"token": token},
Expand Down

0 comments on commit a451eca

Please sign in to comment.