the37lab-authlib 0.1.1750840398__tar.gz → 0.1.1750840415__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.

Potentially problematic release.


This version of the37lab-authlib might be problematic. Click here for more details.

Files changed (15) hide show
  1. {the37lab_authlib-0.1.1750840398 → the37lab_authlib-0.1.1750840415}/PKG-INFO +4 -4
  2. {the37lab_authlib-0.1.1750840398 → the37lab_authlib-0.1.1750840415}/README.md +3 -3
  3. {the37lab_authlib-0.1.1750840398 → the37lab_authlib-0.1.1750840415}/pyproject.toml +1 -1
  4. {the37lab_authlib-0.1.1750840398 → the37lab_authlib-0.1.1750840415}/src/the37lab_authlib/auth.py +0 -5
  5. {the37lab_authlib-0.1.1750840398 → the37lab_authlib-0.1.1750840415}/src/the37lab_authlib.egg-info/PKG-INFO +4 -4
  6. {the37lab_authlib-0.1.1750840398 → the37lab_authlib-0.1.1750840415}/setup.cfg +0 -0
  7. {the37lab_authlib-0.1.1750840398 → the37lab_authlib-0.1.1750840415}/src/the37lab_authlib/__init__.py +0 -0
  8. {the37lab_authlib-0.1.1750840398 → the37lab_authlib-0.1.1750840415}/src/the37lab_authlib/db.py +0 -0
  9. {the37lab_authlib-0.1.1750840398 → the37lab_authlib-0.1.1750840415}/src/the37lab_authlib/decorators.py +0 -0
  10. {the37lab_authlib-0.1.1750840398 → the37lab_authlib-0.1.1750840415}/src/the37lab_authlib/exceptions.py +0 -0
  11. {the37lab_authlib-0.1.1750840398 → the37lab_authlib-0.1.1750840415}/src/the37lab_authlib/models.py +0 -0
  12. {the37lab_authlib-0.1.1750840398 → the37lab_authlib-0.1.1750840415}/src/the37lab_authlib.egg-info/SOURCES.txt +0 -0
  13. {the37lab_authlib-0.1.1750840398 → the37lab_authlib-0.1.1750840415}/src/the37lab_authlib.egg-info/dependency_links.txt +0 -0
  14. {the37lab_authlib-0.1.1750840398 → the37lab_authlib-0.1.1750840415}/src/the37lab_authlib.egg-info/requires.txt +0 -0
  15. {the37lab_authlib-0.1.1750840398 → the37lab_authlib-0.1.1750840415}/src/the37lab_authlib.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: the37lab_authlib
3
- Version: 0.1.1750840398
3
+ Version: 0.1.1750840415
4
4
  Summary: Python SDK for the Authlib
5
5
  Author-email: the37lab <info@the37lab.com>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -50,7 +50,7 @@ pip install -e .
50
50
 
51
51
  ```python
52
52
  from flask import Flask
53
- from authlib import AuthManager
53
+ from authlib import AuthManager, require_auth
54
54
 
55
55
  app = Flask(__name__)
56
56
 
@@ -67,7 +67,7 @@ auth = AuthManager(
67
67
  )
68
68
 
69
69
  @app.route("/protected")
70
- @auth.require_auth(roles=["admin"])
70
+ @require_auth(roles=["admin"])
71
71
  def protected_route():
72
72
  return "Protected content"
73
73
  ```
@@ -144,7 +144,7 @@ def protected_route():
144
144
  - Get redirect URL from `/api/v1/users/login/oauth`.
145
145
  - Complete OAuth flow via `/api/v1/users/login/oauth2callback`.
146
146
  4. **Protected Routes:**
147
- - Use `@auth.require_auth()` decorator to protect Flask routes.
147
+ - Use `@require_auth()` decorator to protect Flask routes.
148
148
 
149
149
  ## User Object
150
150
 
@@ -33,7 +33,7 @@ pip install -e .
33
33
 
34
34
  ```python
35
35
  from flask import Flask
36
- from authlib import AuthManager
36
+ from authlib import AuthManager, require_auth
37
37
 
38
38
  app = Flask(__name__)
39
39
 
@@ -50,7 +50,7 @@ auth = AuthManager(
50
50
  )
51
51
 
52
52
  @app.route("/protected")
53
- @auth.require_auth(roles=["admin"])
53
+ @require_auth(roles=["admin"])
54
54
  def protected_route():
55
55
  return "Protected content"
56
56
  ```
@@ -127,7 +127,7 @@ def protected_route():
127
127
  - Get redirect URL from `/api/v1/users/login/oauth`.
128
128
  - Complete OAuth flow via `/api/v1/users/login/oauth2callback`.
129
129
  4. **Protected Routes:**
130
- - Use `@auth.require_auth()` decorator to protect Flask routes.
130
+ - Use `@require_auth()` decorator to protect Flask routes.
131
131
 
132
132
  ## User Object
133
133
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "the37lab_authlib"
7
- version = "0.1.1750840398"
7
+ version = "0.1.1750840415"
8
8
  description = "Python SDK for the Authlib"
9
9
  authors = [{name = "the37lab", email = "info@the37lab.com"}]
10
10
  dependencies = ["flask", "psycopg2-binary", "pyjwt", "python-dotenv", "requests", "authlib", "bcrypt"]
@@ -128,11 +128,6 @@ class AuthManager:
128
128
  def init_app(self, app):
129
129
  app.auth_manager = self
130
130
  app.register_blueprint(self.create_blueprint())
131
- @app.errorhandler(AuthError)
132
- def handle_auth_error(e):
133
- response = jsonify(e.to_dict())
134
- response.status_code = e.status_code
135
- return response
136
131
 
137
132
  def create_blueprint(self):
138
133
  bp = Blueprint('auth', __name__, url_prefix='/api/v1/users')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: the37lab_authlib
3
- Version: 0.1.1750840398
3
+ Version: 0.1.1750840415
4
4
  Summary: Python SDK for the Authlib
5
5
  Author-email: the37lab <info@the37lab.com>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -50,7 +50,7 @@ pip install -e .
50
50
 
51
51
  ```python
52
52
  from flask import Flask
53
- from authlib import AuthManager
53
+ from authlib import AuthManager, require_auth
54
54
 
55
55
  app = Flask(__name__)
56
56
 
@@ -67,7 +67,7 @@ auth = AuthManager(
67
67
  )
68
68
 
69
69
  @app.route("/protected")
70
- @auth.require_auth(roles=["admin"])
70
+ @require_auth(roles=["admin"])
71
71
  def protected_route():
72
72
  return "Protected content"
73
73
  ```
@@ -144,7 +144,7 @@ def protected_route():
144
144
  - Get redirect URL from `/api/v1/users/login/oauth`.
145
145
  - Complete OAuth flow via `/api/v1/users/login/oauth2callback`.
146
146
  4. **Protected Routes:**
147
- - Use `@auth.require_auth()` decorator to protect Flask routes.
147
+ - Use `@require_auth()` decorator to protect Flask routes.
148
148
 
149
149
  ## User Object
150
150