swarmauri_auth_idp_github 0.2.0.dev5__tar.gz → 0.11.0.dev1__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.
@@ -1,47 +1,48 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: swarmauri_auth_idp_github
3
- Version: 0.2.0.dev5
3
+ Version: 0.11.0.dev1
4
4
  Summary: GitHub OAuth 2.0 / OAuth 2.1 identity provider implementations for Swarmauri
5
5
  License-Expression: Apache-2.0
6
6
  License-File: LICENSE
7
7
  Keywords: swarmauri,sdk,experimental,identity,oauth2,oauth21,github,idp
8
8
  Author: Jacob Stewart
9
9
  Author-email: jacob@swarmauri.com
10
- Requires-Python: >=3.10,<3.13
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: Topic :: Internet :: WWW/HTTP
22
- Classifier: Topic :: Security :: Cryptography
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
- ![Swarmauri Logo](https://github.com/swarmauri/swarmauri-sdk/blob/master/assets/swarmauri.brand.theme.svg)
31
+ ![Swarmauri Logo](https://raw.githubusercontent.com/swarmauri/swarmauri-sdk/master/assets/swarmauri_sdk_brand.png)
30
32
 
31
33
  <p align="center">
34
+ <a href="https://pepy.tech/project/swarmauri_auth_idp_github/">
35
+ <img src="https://static.pepy.tech/badge/swarmauri_auth_idp_github/month" alt="PyPI - Downloads"/></a>
36
+ <a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/standards/swarmauri_auth_idp_github/">
37
+ <img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/standards/swarmauri_auth_idp_github.svg"/></a>
32
38
  <a href="https://pypi.org/project/swarmauri_auth_idp_github/">
33
- <img src="https://img.shields.io/pypi/dm/swarmauri_auth_idp_github" alt="PyPI - Downloads"/></a>
34
- <a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/experimental/swarmauri_auth_idp_github/">
35
- <img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/experimental/swarmauri_auth_idp_github.svg"/></a>
36
- <a href="https://pypi.org/project/swarmauri_auth_idp_github/">
37
- <img src="https://img.shields.io/pypi/pyversions/swarmauri_auth_idp_github" alt="PyPI - Python Version"/></a>
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_github/">
39
41
  <img src="https://img.shields.io/pypi/l/swarmauri_auth_idp_github" alt="PyPI - License"/></a>
40
42
  <a href="https://pypi.org/project/swarmauri_auth_idp_github/">
41
43
  <img src="https://img.shields.io/pypi/v/swarmauri_auth_idp_github?label=swarmauri_auth_idp_github&color=green" alt="PyPI - swarmauri_auth_idp_github"/></a>
42
- </p>
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 GitHub
47
48
 
@@ -118,3 +119,5 @@ To contribute to swarmauri-sdk, review the
118
119
  [guidelines for contributing](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md)
119
120
  which cover development workflow, testing, and coding standards.
120
121
 
122
+
123
+
@@ -1,19 +1,18 @@
1
- ![Swarmauri Logo](https://github.com/swarmauri/swarmauri-sdk/blob/master/assets/swarmauri.brand.theme.svg)
1
+ ![Swarmauri Logo](https://raw.githubusercontent.com/swarmauri/swarmauri-sdk/master/assets/swarmauri_sdk_brand.png)
2
2
 
3
3
  <p align="center">
4
+ <a href="https://pepy.tech/project/swarmauri_auth_idp_github/">
5
+ <img src="https://static.pepy.tech/badge/swarmauri_auth_idp_github/month" alt="PyPI - Downloads"/></a>
6
+ <a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/standards/swarmauri_auth_idp_github/">
7
+ <img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/standards/swarmauri_auth_idp_github.svg"/></a>
4
8
  <a href="https://pypi.org/project/swarmauri_auth_idp_github/">
5
- <img src="https://img.shields.io/pypi/dm/swarmauri_auth_idp_github" alt="PyPI - Downloads"/></a>
6
- <a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/experimental/swarmauri_auth_idp_github/">
7
- <img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/experimental/swarmauri_auth_idp_github.svg"/></a>
8
- <a href="https://pypi.org/project/swarmauri_auth_idp_github/">
9
- <img src="https://img.shields.io/pypi/pyversions/swarmauri_auth_idp_github" alt="PyPI - Python Version"/></a>
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_github/">
11
11
  <img src="https://img.shields.io/pypi/l/swarmauri_auth_idp_github" alt="PyPI - License"/></a>
12
12
  <a href="https://pypi.org/project/swarmauri_auth_idp_github/">
13
13
  <img src="https://img.shields.io/pypi/v/swarmauri_auth_idp_github?label=swarmauri_auth_idp_github&color=green" alt="PyPI - swarmauri_auth_idp_github"/></a>
14
- </p>
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 GitHub
19
18
 
@@ -89,3 +88,5 @@ asyncio.run(run_flow())
89
88
  To contribute to swarmauri-sdk, review the
90
89
  [guidelines for contributing](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md)
91
90
  which cover development workflow, testing, and coding standards.
91
+
92
+
@@ -1,10 +1,10 @@
1
1
  [project]
2
2
  name = "swarmauri_auth_idp_github"
3
- version = "0.2.0.dev5"
3
+ version = "0.11.0.dev1"
4
4
  description = "GitHub OAuth 2.0 / OAuth 2.1 identity provider implementations for Swarmauri"
5
5
  license = "Apache-2.0"
6
6
  readme = "README.md"
7
- requires-python = ">=3.10,<3.13"
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
- "Topic :: Internet :: WWW/HTTP",
22
- "Topic :: Security :: Cryptography",
23
+ "Programming Language :: Python :: 3.13",
24
+ "Programming Language :: Python :: 3.14",
23
25
  ]
24
26
  keywords = [
25
27
  "swarmauri",
@@ -42,7 +42,9 @@ class GitHubAppClientMixin:
42
42
  def _app_jwt(self) -> str:
43
43
  now = int(time.time())
44
44
  payload = {"iat": now - 60, "exp": now + 600, "iss": self.app_id}
45
- return jwt.encode(payload, self._private_key_value(), algorithm="RS256")
45
+ return jwt.encode(
46
+ payload, self._private_key_value(), algorithm="RS256"
47
+ )
46
48
 
47
49
  def _request_payload(self) -> Dict[str, Any]:
48
50
  payload: Dict[str, Any] = {}
@@ -18,7 +18,9 @@ class GitHubOAuth20Login(GitHubOAuthLoginMixin, OAuth20LoginBase):
18
18
  payload = await self._auth_payload()
19
19
  return {"url": payload["url"], "state": payload["state"]}
20
20
 
21
- async def exchange_and_identity(self, code: str, state: str) -> Mapping[str, Any]:
21
+ async def exchange_and_identity(
22
+ self, code: str, state: str
23
+ ) -> Mapping[str, Any]:
22
24
  tokens = await self._exchange_tokens(code, state)
23
25
  profile = await self._fetch_profile(tokens["access_token"])
24
26
  return {
@@ -18,7 +18,9 @@ class GitHubOAuth21Login(GitHubOAuthLoginMixin, OAuth21LoginBase):
18
18
  payload = await self._auth_payload()
19
19
  return {"url": payload["url"], "state": payload["state"]}
20
20
 
21
- async def exchange_and_identity(self, code: str, state: str) -> Mapping[str, Any]:
21
+ async def exchange_and_identity(
22
+ self, code: str, state: str
23
+ ) -> Mapping[str, Any]:
22
24
  tokens = await self._exchange_tokens(code, state)
23
25
  profile = await self._fetch_profile(tokens["access_token"])
24
26
  return {
@@ -59,7 +59,9 @@ class GitHubOAuthLoginMixin:
59
59
  )
60
60
  return {"url": url, "state": state, "verifier": verifier}
61
61
 
62
- async def _exchange_tokens(self, code: str, state: str) -> Mapping[str, Any]:
62
+ async def _exchange_tokens(
63
+ self, code: str, state: str
64
+ ) -> Mapping[str, Any]:
63
65
  payload = verify_state(self._state_secret_value(), state)
64
66
  form = {
65
67
  "client_id": self.client_id,
@@ -108,7 +110,11 @@ class GitHubOAuthLoginMixin:
108
110
  None,
109
111
  )
110
112
  fallback = primary or next(
111
- (entry for entry in emails if isinstance(entry, Mapping)),
113
+ (
114
+ entry
115
+ for entry in emails
116
+ if isinstance(entry, Mapping)
117
+ ),
112
118
  None,
113
119
  )
114
120
  if fallback: