swarmauri_auth_idp_facebook 0.2.0.dev5__tar.gz → 0.11.0.dev2__tar.gz
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.
- {swarmauri_auth_idp_facebook-0.2.0.dev5 → swarmauri_auth_idp_facebook-0.11.0.dev2}/PKG-INFO +14 -11
- {swarmauri_auth_idp_facebook-0.2.0.dev5 → swarmauri_auth_idp_facebook-0.11.0.dev2}/README.md +8 -7
- {swarmauri_auth_idp_facebook-0.2.0.dev5 → swarmauri_auth_idp_facebook-0.11.0.dev2}/pyproject.toml +6 -4
- {swarmauri_auth_idp_facebook-0.2.0.dev5 → swarmauri_auth_idp_facebook-0.11.0.dev2}/swarmauri_auth_idp_facebook/FacebookLoginMixin.py +3 -1
- {swarmauri_auth_idp_facebook-0.2.0.dev5 → swarmauri_auth_idp_facebook-0.11.0.dev2}/swarmauri_auth_idp_facebook/FacebookOAuth20AppClient.py +6 -2
- {swarmauri_auth_idp_facebook-0.2.0.dev5 → swarmauri_auth_idp_facebook-0.11.0.dev2}/swarmauri_auth_idp_facebook/FacebookOAuth20Login.py +3 -1
- {swarmauri_auth_idp_facebook-0.2.0.dev5 → swarmauri_auth_idp_facebook-0.11.0.dev2}/swarmauri_auth_idp_facebook/FacebookOAuth21Login.py +3 -1
- {swarmauri_auth_idp_facebook-0.2.0.dev5 → swarmauri_auth_idp_facebook-0.11.0.dev2}/swarmauri_auth_idp_facebook/FacebookOIDC10Login.py +1 -1
- {swarmauri_auth_idp_facebook-0.2.0.dev5 → swarmauri_auth_idp_facebook-0.11.0.dev2}/LICENSE +0 -0
- {swarmauri_auth_idp_facebook-0.2.0.dev5 → swarmauri_auth_idp_facebook-0.11.0.dev2}/swarmauri_auth_idp_facebook/FacebookOAuth21AppClient.py +0 -0
- {swarmauri_auth_idp_facebook-0.2.0.dev5 → swarmauri_auth_idp_facebook-0.11.0.dev2}/swarmauri_auth_idp_facebook/FacebookOIDC10AppClient.py +0 -0
- {swarmauri_auth_idp_facebook-0.2.0.dev5 → swarmauri_auth_idp_facebook-0.11.0.dev2}/swarmauri_auth_idp_facebook/__init__.py +0 -0
|
@@ -1,47 +1,48 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: swarmauri_auth_idp_facebook
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.11.0.dev2
|
|
4
4
|
Summary: Facebook OAuth 2.0 / OAuth 2.1 / OIDC 1.0 login implementations for Swarmauri
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
License-File: LICENSE
|
|
7
7
|
Keywords: swarmauri,sdk,standards,identity,oauth2,oauth21,oidc,facebook,meta
|
|
8
8
|
Author: Jacob Stewart
|
|
9
9
|
Author-email: jacob@swarmauri.com
|
|
10
|
-
Requires-Python: >=3.10,<3.
|
|
10
|
+
Requires-Python: >=3.10,<3.15
|
|
11
11
|
Classifier: Development Status :: 1 - Planning
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
13
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
14
|
Classifier: Natural Language :: English
|
|
15
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
16
|
+
Classifier: Topic :: Security :: Cryptography
|
|
15
17
|
Classifier: Programming Language :: Python
|
|
16
18
|
Classifier: Programming Language :: Python :: 3
|
|
17
19
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
20
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
21
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
22
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
-
Classifier:
|
|
22
|
-
Classifier:
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
23
25
|
Requires-Dist: httpx (>=0.27)
|
|
24
26
|
Requires-Dist: pyjwt[crypto] (>=2.8)
|
|
25
27
|
Requires-Dist: swarmauri_base
|
|
26
28
|
Requires-Dist: swarmauri_core
|
|
27
29
|
Description-Content-Type: text/markdown
|
|
28
30
|
|
|
29
|
-

|
|
30
32
|
|
|
31
33
|
<p align="center">
|
|
32
|
-
<a href="https://
|
|
33
|
-
<img src="https://
|
|
34
|
+
<a href="https://pepy.tech/project/swarmauri_auth_idp_facebook/">
|
|
35
|
+
<img src="https://static.pepy.tech/badge/swarmauri_auth_idp_facebook/month" alt="PyPI - Downloads"/></a>
|
|
34
36
|
<a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/standards/swarmauri_auth_idp_facebook/">
|
|
35
37
|
<img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/standards/swarmauri_auth_idp_facebook.svg"/></a>
|
|
36
38
|
<a href="https://pypi.org/project/swarmauri_auth_idp_facebook/">
|
|
37
|
-
<img src="https://img.shields.io/
|
|
39
|
+
<img src="https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue" alt="PyPI - Python Version"/></a>
|
|
38
40
|
<a href="https://pypi.org/project/swarmauri_auth_idp_facebook/">
|
|
39
41
|
<img src="https://img.shields.io/pypi/l/swarmauri_auth_idp_facebook" alt="PyPI - License"/></a>
|
|
40
42
|
<a href="https://pypi.org/project/swarmauri_auth_idp_facebook/">
|
|
41
43
|
<img src="https://img.shields.io/pypi/v/swarmauri_auth_idp_facebook?label=swarmauri_auth_idp_facebook&color=green" alt="PyPI - swarmauri_auth_idp_facebook"/></a>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
---
|
|
44
|
+
<a href="https://discord.gg/N4UpBuQv8T">
|
|
45
|
+
<img src="https://img.shields.io/badge/Discord-Join%20Chat-5865F2?logo=discord&logoColor=white" alt="Discord"/></a></p>
|
|
45
46
|
|
|
46
47
|
# Swarmauri Auth IDP Facebook
|
|
47
48
|
|
|
@@ -110,3 +111,5 @@ To contribute to swarmauri-sdk, review the
|
|
|
110
111
|
[guidelines for contributing](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md)
|
|
111
112
|
which cover development workflow, testing, and coding standards.
|
|
112
113
|
|
|
114
|
+
|
|
115
|
+
|
{swarmauri_auth_idp_facebook-0.2.0.dev5 → swarmauri_auth_idp_facebook-0.11.0.dev2}/README.md
RENAMED
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-

|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<a href="https://
|
|
5
|
-
<img src="https://
|
|
4
|
+
<a href="https://pepy.tech/project/swarmauri_auth_idp_facebook/">
|
|
5
|
+
<img src="https://static.pepy.tech/badge/swarmauri_auth_idp_facebook/month" alt="PyPI - Downloads"/></a>
|
|
6
6
|
<a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/standards/swarmauri_auth_idp_facebook/">
|
|
7
7
|
<img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/standards/swarmauri_auth_idp_facebook.svg"/></a>
|
|
8
8
|
<a href="https://pypi.org/project/swarmauri_auth_idp_facebook/">
|
|
9
|
-
<img src="https://img.shields.io/
|
|
9
|
+
<img src="https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue" alt="PyPI - Python Version"/></a>
|
|
10
10
|
<a href="https://pypi.org/project/swarmauri_auth_idp_facebook/">
|
|
11
11
|
<img src="https://img.shields.io/pypi/l/swarmauri_auth_idp_facebook" alt="PyPI - License"/></a>
|
|
12
12
|
<a href="https://pypi.org/project/swarmauri_auth_idp_facebook/">
|
|
13
13
|
<img src="https://img.shields.io/pypi/v/swarmauri_auth_idp_facebook?label=swarmauri_auth_idp_facebook&color=green" alt="PyPI - swarmauri_auth_idp_facebook"/></a>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
---
|
|
14
|
+
<a href="https://discord.gg/N4UpBuQv8T">
|
|
15
|
+
<img src="https://img.shields.io/badge/Discord-Join%20Chat-5865F2?logo=discord&logoColor=white" alt="Discord"/></a></p>
|
|
17
16
|
|
|
18
17
|
# Swarmauri Auth IDP Facebook
|
|
19
18
|
|
|
@@ -81,3 +80,5 @@ print(login.client_id)
|
|
|
81
80
|
To contribute to swarmauri-sdk, review the
|
|
82
81
|
[guidelines for contributing](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md)
|
|
83
82
|
which cover development workflow, testing, and coding standards.
|
|
83
|
+
|
|
84
|
+
|
{swarmauri_auth_idp_facebook-0.2.0.dev5 → swarmauri_auth_idp_facebook-0.11.0.dev2}/pyproject.toml
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "swarmauri_auth_idp_facebook"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.11.0.dev2"
|
|
4
4
|
description = "Facebook OAuth 2.0 / OAuth 2.1 / OIDC 1.0 login implementations for Swarmauri"
|
|
5
5
|
license = "Apache-2.0"
|
|
6
6
|
readme = "README.md"
|
|
7
|
-
requires-python = ">=3.10,<3.
|
|
7
|
+
requires-python = ">=3.10,<3.15"
|
|
8
8
|
repository = "https://github.com/swarmauri/swarmauri-sdk"
|
|
9
9
|
authors = [{ name = "Jacob Stewart", email = "jacob@swarmauri.com" }]
|
|
10
10
|
classifiers = [
|
|
@@ -12,14 +12,16 @@ classifiers = [
|
|
|
12
12
|
"Intended Audience :: Developers",
|
|
13
13
|
"License :: OSI Approved :: Apache Software License",
|
|
14
14
|
"Natural Language :: English",
|
|
15
|
+
"Topic :: Internet :: WWW/HTTP",
|
|
16
|
+
"Topic :: Security :: Cryptography",
|
|
15
17
|
"Programming Language :: Python",
|
|
16
18
|
"Programming Language :: Python :: 3",
|
|
17
19
|
"Programming Language :: Python :: 3 :: Only",
|
|
18
20
|
"Programming Language :: Python :: 3.10",
|
|
19
21
|
"Programming Language :: Python :: 3.11",
|
|
20
22
|
"Programming Language :: Python :: 3.12",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
+
"Programming Language :: Python :: 3.13",
|
|
24
|
+
"Programming Language :: Python :: 3.14",
|
|
23
25
|
]
|
|
24
26
|
keywords = [
|
|
25
27
|
"swarmauri",
|
|
@@ -90,7 +90,9 @@ class FacebookLoginMixin:
|
|
|
90
90
|
response.raise_for_status()
|
|
91
91
|
return response.json()
|
|
92
92
|
|
|
93
|
-
async def _exchange_tokens(
|
|
93
|
+
async def _exchange_tokens(
|
|
94
|
+
self, code: str, state: str
|
|
95
|
+
) -> Mapping[str, Any]:
|
|
94
96
|
payload = verify_state(self._state_secret(), state)
|
|
95
97
|
form = {
|
|
96
98
|
"grant_type": "authorization_code",
|
|
@@ -34,9 +34,13 @@ class FacebookOAuth20AppClient(OAuth20AppClientBase):
|
|
|
34
34
|
return self.client_secret.get_secret_value()
|
|
35
35
|
|
|
36
36
|
def _token_endpoint(self) -> str:
|
|
37
|
-
return
|
|
37
|
+
return (
|
|
38
|
+
f"{self.graph_base.rstrip('/')}/{self.version}/oauth/access_token"
|
|
39
|
+
)
|
|
38
40
|
|
|
39
|
-
async def _request_token(
|
|
41
|
+
async def _request_token(
|
|
42
|
+
self, form: Mapping[str, str]
|
|
43
|
+
) -> Mapping[str, str]:
|
|
40
44
|
async with self._http_client_factory() as client:
|
|
41
45
|
response = await client.post_retry(
|
|
42
46
|
self._token_endpoint(),
|
|
@@ -20,7 +20,9 @@ class FacebookOAuth20Login(FacebookLoginMixin, OAuth20LoginBase):
|
|
|
20
20
|
payload = await self._auth_payload()
|
|
21
21
|
return {"url": payload["url"], "state": payload["state"]}
|
|
22
22
|
|
|
23
|
-
async def exchange_and_identity(
|
|
23
|
+
async def exchange_and_identity(
|
|
24
|
+
self, code: str, state: str
|
|
25
|
+
) -> Mapping[str, Any]:
|
|
24
26
|
tokens = await self._exchange_tokens(code, state)
|
|
25
27
|
access_token = tokens.get("access_token")
|
|
26
28
|
profile: Mapping[str, Any] = {}
|
|
@@ -31,7 +31,9 @@ class FacebookOAuth21Login(FacebookLoginMixin, OAuth21LoginBase):
|
|
|
31
31
|
return None
|
|
32
32
|
return claims
|
|
33
33
|
|
|
34
|
-
async def exchange_and_identity(
|
|
34
|
+
async def exchange_and_identity(
|
|
35
|
+
self, code: str, state: str
|
|
36
|
+
) -> Mapping[str, Any]:
|
|
35
37
|
tokens = await self._exchange_tokens(code, state)
|
|
36
38
|
claims = await self._claims_from_id_token(tokens.get("id_token"))
|
|
37
39
|
if claims:
|
|
@@ -152,7 +152,7 @@ class FacebookOIDC10Login(OIDC10LoginBase):
|
|
|
152
152
|
response = await client.get_retry(
|
|
153
153
|
metadata["userinfo_endpoint"],
|
|
154
154
|
headers={
|
|
155
|
-
"Authorization": f"Bearer {tokens.get('access_token', '')}",
|
|
155
|
+
"Authorization": f"Bearer {tokens.get('access_token', '')}", # noqa: E501
|
|
156
156
|
"Accept": "application/json",
|
|
157
157
|
},
|
|
158
158
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|