Skip to content

Commit

Permalink
AUT-2461: updating python sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleJono committed Nov 28, 2024
1 parent 6fde571 commit 13322d2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions authsignal/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def update_user(self, user_id: str, attributes: Dict[str, Any]) -> Dict[str, Any

path = f"{self.api_url}/users/{urllib.parse.quote(user_id)}"

response = self.session.post(
response = self.session.patch(
url=path, data=json.dumps(attributes, cls=DecimalEncoder)
)

Expand All @@ -172,7 +172,7 @@ def delete_user(self, user_id: str) -> Dict[str, Any]:

response = self.session.delete(url=path)

return response.decamelized_content
return

def get_authenticators(self, user_id: str) -> Dict[str, Any]:
"""Retrieves the authenticators for a user
Expand Down Expand Up @@ -221,13 +221,15 @@ def delete_authenticator(

response = self.session.delete(url=path)

return response.decamelized_content
return

def validate_challenge(self, attributes: Dict[str, Any]) -> Dict[str, Any]:
"""Validates a token from authsignal
Args:
attributes: A dictionary containing the token to validate.
"""
_assert_non_empty_dict(attributes, "attributes")

path = f"{self.api_url}/validate"

response = self.session.post(
Expand Down

0 comments on commit 13322d2

Please sign in to comment.