Skip to content

Commit

Permalink
Migrate from v0 to v1 in auth (#94)
Browse files Browse the repository at this point in the history
* Update auth.py

* Update test_auth.py
  • Loading branch information
Pasarus authored Jan 16, 2025
1 parent 50c4e2e commit 7b47826
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fia_auth/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def authenticate(credentials: UserCredentials) -> User:
data = {"username": credentials.username, "password": credentials.password}
logger.info(f"Authentication user: {credentials.username[0:3]}*****") # Partial reveal to help logging
response = requests.post(
f"{UOWS_URL}/v0/sessions",
f"{UOWS_URL}/v1/sessions",
json=data,
headers={"Content-Type": "application/json"},
timeout=30,
Expand Down
2 changes: 1 addition & 1 deletion test/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_authenticate_success(mock_post):
assert user.user_number == "12345"

mock_post.assert_called_once_with(
"https://devapi.facilities.rl.ac.uk/users-service/v0/sessions",
"https://devapi.facilities.rl.ac.uk/users-service/v1/sessions",
json={"username": "valid_user", "password": "valid_password"},
headers={"Content-Type": "application/json"},
timeout=30,
Expand Down

0 comments on commit 7b47826

Please sign in to comment.