Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: adapt login to new server situation #135

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions dsp_permissions_scripts/models/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ class Hosts:

LOCALHOST = "http://0.0.0.0:3333"
PROD = "https://api.dasch.swiss"
RDU_STAGE = "https://api.rdu-stage.dasch.swiss"
DEV = "https://api.dev.dasch.swiss"
LS_PROD = "https://api.ls-prod.admin.ch"
STAGE = "https://api.stage.dasch.swiss"
jnussbaum marked this conversation as resolved.
Show resolved Hide resolved

@staticmethod
def get_host(identifier: str) -> str:
Expand Down
3 changes: 0 additions & 3 deletions dsp_permissions_scripts/utils/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ def _get_login_credentials(host: str) -> tuple[str, str]:
if host == Hosts.LOCALHOST:
user = "[email protected]"
pw = "test"
elif host == Hosts.RDU_STAGE:
user = os.getenv("RDU_STAGE_EMAIL") or ""
pw = os.getenv("RDU_STAGE_PASSWORD") or ""
jnussbaum marked this conversation as resolved.
Show resolved Hide resolved
elif re.search(r"api.rdu-\d\d.dasch.swiss", host):
user = os.getenv("RDU_TEST_EMAIL") or ""
pw = os.getenv("RDU_TEST_PASSWORD") or ""
Expand Down