Identity

Latest version: v0.7.0

Safety actively analyzes 623439 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.7.0

* New feature: A high level API for Flask that has feature parity with the high level API of Django which was released in 0.6.0
* Breaking change: Normalize the logout url of Django API to `<a href="{% url 'identity.logout' %}">Logout</a>`

0.6.0

This release brings lots of improvements to the high level API for Django.

* New feature: Supports Microsoft Entra External ID with custom domain. Please refer to [the configuration](https://identity-library.readthedocs.io/en/latest/django.html#django-configuration) for the details.
* New feature and breaking change: Those Django views decorated by `settings.AUTH.login_required` must accept a keyword parameter `context` now, such as `def index(request, *, context)`. And the signed-in user's information is available in `context["user"]`.
* New feature and breaking change: Django views can now be decorated by `settings.AUTH.login_required(scopes=["your_scope"])` and accept a keyword parameter `context`, such as `def call_web_api(request, *, context)`. The access token will be available in `context["access_token"]`. The old pattern `identity.django.Auth(...).get_token_for_user()` is removed. The token usage is therefore vastly simplified.
* Enhancement: After a successful re-sign-in triggered by `settings.AUTH.login_required`, the user will be brought back to the current page, not the index page.
* Enhancement: The initial sign-in no longer uses scope, thus more likely to succeed. The subsequent token-demanding views will automatically trigger the consent (when necessary); this is also known as "incremental consent".
* Breaking change: `identity.django.Auth(..., scopes=...)` parameter is removed.
* Dropping support for Python 3.7.

**Full Changelog**: https://github.com/rayluo/identity/compare/0.5.2...0.6.0

0.5.2

* Enhancement: The django adapter no longer requires a view named "index" (18)

0.5.1

Bugfix: The logout feature was broken for Microsoft Entra external ID. Now fixed. (17)

0.5.0

* Breaking change: Replace exotic `Auth(..., redirect_view=...)` with ubiquitous `Auth(..., redirect_uri=...)`.
* Enhancement: Add a url name `identity.django.logout` which can be used inside any template via `{% url 'identity.django.logout' %}` to obtain a logout link.

0.4.0

NOTE: Obsolete. Please use 0.5.0+ instead.

This release brings in support for Django by a new API `from identity.django import Auth; AUTH=Auth(...)`. Please see the details in [this sample](https://github.com/Azure-Samples/ms-identity-python-webapp-django).

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.