Releases: descope/python-sdk
Releases · descope/python-sdk
1.6.0
Breaking changes
- Support multiple domains for tenant: There's an option to automatically associated a user to a tenant based on the user's email domain. Sometimes the same tenant can 'accept' multiple domains - so that's supported now!
Please notice that this breaks compilation - considering this value is now an array and not a string.
Enhancements
- Appending user login IDs: We've added the option to assign multiple login IDs to a user, using the
additional_login_ids
parameter, upon creation and/or invitation of the user. - First, middle and last names of a user: We added system attributes for first (
given_name
), middle (middle_name
) and last (family_name
) of a user. - Control audience claim in access keys: With the new
audience
parameter in theexchange_access_key
function - you can control theaud
claim in the JWT that's created for the access key. - Set the user's roles: We now support the option to set an existing user's roles. Instead of fetching existing roles, removing all of them and adding new ones 'from scratch' - use the
set_roles
user function. - Check roles or permissions of a user: Check if the user has at least one of the roles in a provided list, using the
get_matched_roles
function. This also applies for checking permissions (get_matched_permissions
), and also for checking the existence on a project level and a specific tenant level (get_matched_tenant_roles
,get_matched_tenant_permissions
). - Batch user invitation: You can now use the
invite_batch
function to add multiple users to your project. - Remove a user's passkey login IDs: Using the
remove_all_passkeys
management function, the Descoper can decide to remove all passkeys associated with a specific user. - Delete a user by its user ID: Support to delete a user by its userId property, using the new
delete_by_user_id
function.
Bug fixes
- Support embedded delivery method and login options in test users: Some functionalities were left out from the test users' support, so we made sure those are quickly added.
1.5.9
Enhancements
- ReBAC support: Descope now supports an advanced and more elaborate concept of authorization, known as ReBAC. ReBAC, Relation-Based Access Control, allows defining the user's permissions based on its relationship to various objects, using a directed graph of connections between them. Read more in our README.
- Search users by email or phone: We enabled the option to search over the user email and phone attributes - regardless if those are used as Login IDs or not.
- Flask decorators as extra package: We've added Flask as an extra package to the SDK. This means that it is not installed by default, but only when setting the relevant flag appropriately, and installing all relevant Flask dependencies.
- Search over tenants: Using the
search_all
tenants command, you can now search for all tenants based on their attribute values, such as name, self-provisioning domains, custom attributes and more. - Logout all user sessions: Descopers can now decide to terminate a specific user's sessions across existing devices, using the management SDK. You can do so by providing the user's Login ID (
logout_user_by_user_id
) or their User ID (logout_user
). - Invitation of users using their phone number: If needed, upon inviting a user - you can configure that the invitation is sent via SMS using the sendSMS boolean flag.
- Cloning a project: Projects can be programmatically cloned using the new
clone
project command. Note that this action is supported for pro and enterprise licensed customers. - README enhancements: Making our README more informative and full of examples for better explainability!
Bug fixes
- Improved exception type catches: To provide as much information as we can on token validation exceptions, we've changed our existing encapsulated errors to be more specific.
1.5.8
Enhancements
- Setting email and phone verification status upon creation: When creating a new user, you can now control whether the email and/or phone of that user are verified or not.
- Setting the Invitation URL via SDK: Using the new
invite_url
parameter, you can define a specific invitation URL when inviting a new user, that will override the default invitation URL set in your project's settings.
1.5.7
Enhancements
- Password Replace return value: We're now returning the JWT's response in the
password.replace
function, so that the session and refresh JWTs can be utilized (for example, in flows). - OIDC JWT validation support: For OIDC JWT validation, we've added the option to pass the
audience
value to all validation functions (such asvalidation_session
). That value will be compared to theaud
claim in the JWT, so to make sure those are aligned. This is a must when using OIDC.
1.5.6
Enhancements
- Embedded links: We now support the option of generating an embedded link. Using the
generate_embedded_link
function, the Descoper can now generate a link that contains a user's token, thus requiring only verification to finalize the authentication.
⚠️ Please notice that this feature needs to be turned on in the console, as it's considered an advanced feature that requires extra planning and attention when used. Make sure only permitted personnel use it, and that it is audited appropriately in the relevant places. - Search by user status: We've added the option to search over user
statuses
using thesearch_all
function.
1.5.5
Breaking changes
- Update of the
configure_via_metadata
andconfigure
SSO functions: We've added two new parameters to theconfigure_via_metadata
function -redirect_url
,domain
. This is to complete the SSO configuration options when using the metadata URL option.
We've also made these parameters mandatory in theconfigure
function (used for configuring SSO using connection details).
Please notice that this breaks function signatures for both theconfigure_via_metadata
andconfigure
functions.
Enhancements
- Load tenant by ID: We added an option to load a specific tenant, using the
load
tenant function.
1.5.4
1.5.3
1.5.2
Enhancements
- Get a user's OAuth provider tokens: When using your own OAuth provider account, you can now choose to request additional scopes and have the provider's access tokens managed by Descope. When needed, those can be fetched using the
get_provider_token
function, which retrieves the token for your application to use. - Delete a tenant's SAML configuration: Using the
delete_settings
function, you can define which tenant's SAML configuration should be deleted. - Search over audit logs: You can now filter over Descope's audit logs using the
search
audit function. For a full list of filter options see function's documentation.
1.5.1
Enhancements
- Set and expire user passwords: You can now expire a user's password using the
expire_password
function, which will make the user reset it on their next authentication. There's also the option to set a new one using theset_password
function; notice that even when choosing a password, the user will still need reset it on their next authentication. - Package dependencies definition: We expanded our dependency ranges to increase compatibility.
Bug fixes
- JWT claims in validation responses: When validating the session (using
validate_session
,refresh_session
andvalidate_and_refresh_session
functions) we aligned the response to include the session JWT claims under thesessionToken
key. On top of that - information such as user ID (sub
), project ID (iss
) and associations such as tenants - are all populated with the relevant values.