plain.oauth 0.25.1__py3-none-any.whl → 0.26.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- plain/oauth/CHANGELOG.md +11 -0
- plain/oauth/admin.py +1 -1
- plain/oauth/models.py +3 -3
- plain/oauth/providers.py +1 -1
- {plain_oauth-0.25.1.dist-info → plain_oauth-0.26.0.dist-info}/METADATA +2 -2
- {plain_oauth-0.25.1.dist-info → plain_oauth-0.26.0.dist-info}/RECORD +8 -8
- {plain_oauth-0.25.1.dist-info → plain_oauth-0.26.0.dist-info}/WHEEL +0 -0
- {plain_oauth-0.25.1.dist-info → plain_oauth-0.26.0.dist-info}/licenses/LICENSE +0 -0
plain/oauth/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# plain-oauth changelog
|
2
2
|
|
3
|
+
## [0.26.0](https://github.com/dropseed/plain/releases/plain-oauth@0.26.0) (2025-09-12)
|
4
|
+
|
5
|
+
### What's changed
|
6
|
+
|
7
|
+
- Model queries now use `.query` instead of `.objects` ([037a239](https://github.com/dropseed/plain/commit/037a239ef4))
|
8
|
+
- Minimum Python version increased to 3.13 ([d86e307](https://github.com/dropseed/plain/commit/d86e307efb))
|
9
|
+
|
10
|
+
### Upgrade instructions
|
11
|
+
|
12
|
+
- Update any custom code that references `OAuthConnection.objects` to use `OAuthConnection.query` instead
|
13
|
+
|
3
14
|
## [0.25.1](https://github.com/dropseed/plain/releases/plain-oauth@0.25.1) (2025-08-22)
|
4
15
|
|
5
16
|
### What's changed
|
plain/oauth/admin.py
CHANGED
plain/oauth/models.py
CHANGED
@@ -95,7 +95,7 @@ class OAuthConnection(models.Model):
|
|
95
95
|
cls, *, provider_key: str, oauth_token: "OAuthToken", oauth_user: "OAuthUser"
|
96
96
|
) -> "OAuthConnection":
|
97
97
|
try:
|
98
|
-
connection = cls.
|
98
|
+
connection = cls.query.get(
|
99
99
|
provider_key=provider_key,
|
100
100
|
provider_user_id=oauth_user.provider_id,
|
101
101
|
)
|
@@ -134,7 +134,7 @@ class OAuthConnection(models.Model):
|
|
134
134
|
Connect will either create a new connection or update an existing connection
|
135
135
|
"""
|
136
136
|
try:
|
137
|
-
connection = cls.
|
137
|
+
connection = cls.query.get(
|
138
138
|
user=user,
|
139
139
|
provider_key=provider_key,
|
140
140
|
provider_user_id=oauth_user.provider_id,
|
@@ -172,7 +172,7 @@ class OAuthConnection(models.Model):
|
|
172
172
|
|
173
173
|
try:
|
174
174
|
keys_in_db = set(
|
175
|
-
cls.
|
175
|
+
cls.query.values_list("provider_key", flat=True).distinct()
|
176
176
|
)
|
177
177
|
except (OperationalError, ProgrammingError):
|
178
178
|
# Check runs on plain migrate, and the table may not exist yet
|
plain/oauth/providers.py
CHANGED
@@ -144,7 +144,7 @@ class OAuthProvider:
|
|
144
144
|
|
145
145
|
def handle_disconnect_request(self, *, request: HttpRequest) -> Response:
|
146
146
|
provider_user_id = request.data["provider_user_id"]
|
147
|
-
connection = OAuthConnection.
|
147
|
+
connection = OAuthConnection.query.get(
|
148
148
|
provider_key=self.provider_key, provider_user_id=provider_user_id
|
149
149
|
)
|
150
150
|
connection.delete()
|
@@ -1,11 +1,11 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: plain.oauth
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.26.0
|
4
4
|
Summary: Let users log in with OAuth providers.
|
5
5
|
Author-email: Dave Gaeddert <dave.gaeddert@dropseed.dev>
|
6
6
|
License-Expression: BSD-3-Clause
|
7
7
|
License-File: LICENSE
|
8
|
-
Requires-Python: >=3.
|
8
|
+
Requires-Python: >=3.13
|
9
9
|
Requires-Dist: plain-auth<1.0.0
|
10
10
|
Requires-Dist: plain-models<1.0.0
|
11
11
|
Requires-Dist: plain<1.0.0
|
@@ -1,18 +1,18 @@
|
|
1
|
-
plain/oauth/CHANGELOG.md,sha256=
|
1
|
+
plain/oauth/CHANGELOG.md,sha256=8n2YLJ2UJAucV_A52-_bSgugvQiydzYMM-oggPSvI_I,3248
|
2
2
|
plain/oauth/README.md,sha256=m3RRb01DLnoxBtzuYzESSe49OmsZ8P1R5_QsfCSRQgo,11077
|
3
3
|
plain/oauth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
-
plain/oauth/admin.py,sha256=
|
4
|
+
plain/oauth/admin.py,sha256=s259OnTWGeOv3nVl4hAV-lNAIE4d2ObbG_97ENC6TuY,1308
|
5
5
|
plain/oauth/config.py,sha256=0Q4IILBKQbIaxqeL9WRTH5Cka-BO3c3SOj1AdQIAJgc,167
|
6
6
|
plain/oauth/default_settings.py,sha256=dlN1J9vSOjjxPNLp-0qe-cLTqwM4E69ZAx_8lpxMhaM,28
|
7
7
|
plain/oauth/exceptions.py,sha256=yoZsq8XgzstuwbE2ihoet0nzpw_sVZgDrwUauh6hhUs,546
|
8
|
-
plain/oauth/models.py,sha256=
|
9
|
-
plain/oauth/providers.py,sha256=
|
8
|
+
plain/oauth/models.py,sha256=4CMjpXOIie6mqqPLcneM1ZTNokd3d90lFNnaxcoI80g,6733
|
9
|
+
plain/oauth/providers.py,sha256=hk4e-7WKZcou0-OWPV1x07JB4duef9hRFGeA9fANCoU,7791
|
10
10
|
plain/oauth/urls.py,sha256=FYzpQwhvZdcat8n3f7RyA-1Q21finKb8JEyakSOjXXg,696
|
11
11
|
plain/oauth/views.py,sha256=J2NCa37YediBTi82CfRlmsb45hFT6gWN6zMaFHhsDMM,2410
|
12
12
|
plain/oauth/migrations/0001_initial.py,sha256=0NjfF7F3szhUXkpK3JvN10Xkat1QR-VvnX6Oed9iFmo,1940
|
13
13
|
plain/oauth/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
14
14
|
plain/oauth/templates/oauth/callback.html,sha256=4CJG0oAN0xYjw2IPkjaL7B4hwlf9um9LI4CTu50E-yE,173
|
15
|
-
plain_oauth-0.
|
16
|
-
plain_oauth-0.
|
17
|
-
plain_oauth-0.
|
18
|
-
plain_oauth-0.
|
15
|
+
plain_oauth-0.26.0.dist-info/METADATA,sha256=pa7yWU-69bbXL19aWqr5BYmJdCWxNN04VKQfjiY9FnU,11482
|
16
|
+
plain_oauth-0.26.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
17
|
+
plain_oauth-0.26.0.dist-info/licenses/LICENSE,sha256=cvKM3OlqHx3ijD6e34zsSUkPvzl-ya3Dd63A6EHL94U,1500
|
18
|
+
plain_oauth-0.26.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|