Releases: authsignal/authsignal-python
4.0.3: Merge pull request #35 from authsignal/AUT-2461.8
AUT-2429: allowing track with no attributes
4.0.2
Authsignal Python SDK 4.0.0
Breaking Changes
Client Initialization
- The client initialization interface has been updated to use named parameters
api_secret_key
is now required (previouslyapi_key
)- Optional parameters include
api_url
(defaults to "https://api.authsignal.com/v1") andtimeout
(defaults to 2.0 seconds)
SDK Methods
- All methods now use consistent parameter naming and typing
- Added type hints throughout the SDK for better IDE support and code safety
- Requests that require a body expect an
attributes
parameter which needs to be a dictionary of key value pairs, equivalent to the JSON input body. Please use camel case for the keys.
Method Updates
track()
now requiresuser_id
,action
, andattributes
parametersget_user()
now requiresuser_id
parameterupdate_user()
now requiresuser_id
andattributes
parametersdelete_user()
now requiresuser_id
parameterget_authenticators()
now requiresuser_id
parameterenroll_verified_authenticator()
now requiresuser_id
andattributes
parametersdelete_authenticator()
now requiresuser_id
anduser_authenticator_id
parametersvalidate_challenge()
now requiresattributes
parameterget_action()
now requiresuser_id
,action
, andidempotency_key
parametersupdate_action()
now requiresuser_id
,action
,idempotency_key
, andattributes
parameters
Error Handling
- Improved error handling with custom
ApiException
class which is standardized across our SDKs
Migration Guide
If you're upgrading from a previous version, you'll need to:
- Update your client initialization to use the new parameter names
- Review all method calls to ensure they include the required parameters
- Update error handling to work with the new
ApiException
format
3.0.0
Version 3.0.0
Breaking Changes
-
Action Code Deprecation in
validate_challenge
(#27):
Theaction_code
field has been deprecated in favor of theaction
field in thevalidate_challenge
response. If your integration relies onaction_code
, please update it to useaction
instead. -
Renamed
delete_user_authenticator
todelete_authenticator
(#25):
Thedelete_user_authenticator
method has been renamed todelete_authenticator
. Ensure any calls to delete authenticators are updated, as the previous method name is no longer recognized.
Other Changes
-
Centralized Error Handling (#28):
Error handling has been centralized to streamline and standardize responses across different parts of the application. This change improves consistency in error responses. -
Omit Null Values in Requests by Default (#26):
Requests now omit null values by default to align more closely with the behavior of our other SDKs. This adjustment enhances consistency across our ecosystem.
2.0.7
Changes
- Add
action
option invalidate_challenge
method: Ensures that the validated action matches the tracked action when theaction
parameter is provided. - Removed redundant
API_CHALLENGE_URL
. - Automatically append
/v1
toapi_url
if not provided.
2.0.6: Fix GitHub release process (#23)
* Fix Github Release process * Bump version
2.0.5
Release Notes
New Features
delete_user
- Description: This method allows for the deletion of a user from Authsignal.
- Parameters:
user_id (string)
: The unique identifier of the user to be deleted.
- Returns: {"success": True}
delete_user_authenticator
- Description: This method securely deletes a user's authenticator.
- Parameters:
user_id (string)
: The unique identifier of the user.
- Returns: {"success": True}
update_user
- Description: Updates the details of an existing user.
- Parameters:
user_id (string)
: The user's unique identifier.data (dict)
: Updated user details.
- Returns: The updated user
Fix build issues
Fix build issues (#19) * Revert poetry.lock to 1.0.4 * Remove securesystemslib from pyproject.toml * Update poetry.lock * Update gh-action-sigstore-python to v2.1.1 * Remove signing step from publish-to-testpypi
2.0.2
Fix build issue caused by securesystemslib
2.0.1
Breaking changes:
validate_challenge
function:
success
is not returned anymore. Use is_valid
instead.
validate_challenge
now returns the following structure:
{
action: string,
is_valid: boolean,
state: string,
state_updated_at: iso_date_str,
user_id: uuid,
idempotency_key: uuid
}
1.0.4
- Fix JWT decryption issue