the37lab-authlib 0.1.1750156111__py3-none-any.whl → 0.1.1750187527__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.

Potentially problematic release.


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

the37lab_authlib/auth.py CHANGED
@@ -130,7 +130,7 @@ class AuthManager:
130
130
  app.register_blueprint(self.create_blueprint())
131
131
 
132
132
  def create_blueprint(self):
133
- bp = Blueprint('auth', __name__, url_prefix='/v1/users')
133
+ bp = Blueprint('auth', __name__, url_prefix='/api/v1/users')
134
134
 
135
135
  @bp.route('/login', methods=['POST'])
136
136
  @handle_auth_errors
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: the37lab_authlib
3
- Version: 0.1.1750156111
3
+ Version: 0.1.1750187527
4
4
  Summary: Python SDK for the Authlib
5
5
  Author-email: the37lab <info@the37lab.com>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -101,48 +101,48 @@ def protected_route():
101
101
  ## API Endpoints
102
102
 
103
103
  ### Authentication
104
- - `POST /v1/users/login` - Login with username/password
104
+ - `POST /api/v1/users/login` - Login with username/password
105
105
  - **Request:** `{ "username": "string", "password": "string" }`
106
106
  - **Response:** `{ "token": "jwt", "refresh_token": "jwt", "user": { ... } }`
107
- - `POST /v1/users/login/oauth` - Get OAuth redirect URL
107
+ - `POST /api/v1/users/login/oauth` - Get OAuth redirect URL
108
108
  - **Request:** `{ "provider": "google|github|..." }`
109
109
  - **Response:** `{ "redirect_url": "string" }`
110
- - `GET /v1/users/login/oauth2callback` - OAuth callback
110
+ - `GET /api/v1/users/login/oauth2callback` - OAuth callback
111
111
  - **Query Params:** `code`, `state`, `provider`
112
112
  - **Response:** `{ "token": "jwt", "refresh_token": "jwt", "user": { ... } }`
113
- - `POST /v1/users/token-refresh` - Refresh JWT token
113
+ - `POST /api/v1/users/token-refresh` - Refresh JWT token
114
114
  - **Request:** `{ "refresh_token": "jwt" }`
115
115
  - **Response:** `{ "token": "jwt", "refresh_token": "jwt" }`
116
116
 
117
117
  ### User Management
118
- - `POST /v1/users/register` - Register new user
118
+ - `POST /api/v1/users/register` - Register new user
119
119
  - **Request:** `{ "username": "string", "password": "string", "email": "string", ... }`
120
120
  - **Response:** `{ "user": { ... }, "token": "jwt", "refresh_token": "jwt" }`
121
- - `GET /v1/users/login/profile` - Get user profile
121
+ - `GET /api/v1/users/login/profile` - Get user profile
122
122
  - **Auth:** Bearer JWT
123
123
  - **Response:** `{ "user": { ... } }`
124
- - `GET /v1/users/roles` - Get available roles
124
+ - `GET /api/v1/users/roles` - Get available roles
125
125
  - **Response:** `[ "admin", "user", ... ]`
126
126
 
127
127
  ### API Tokens
128
- - `POST /v1/users/{user}/api-tokens` - Create API token
128
+ - `POST /api/v1/users/{user}/api-tokens` - Create API token
129
129
  - **Request:** `{ "name": "string", "scopes": [ ... ] }`
130
130
  - **Response:** `{ "token": "string", "id": "uuid", ... }`
131
- - `GET /v1/users/{user}/api-tokens` - List API tokens
131
+ - `GET /api/v1/users/{user}/api-tokens` - List API tokens
132
132
  - **Response:** `[ { "id": "uuid", "name": "string", ... } ]`
133
- - `DELETE /v1/users/{user}/api-tokens/{token_id}` - Delete API token
133
+ - `DELETE /api/v1/users/{user}/api-tokens/{token_id}` - Delete API token
134
134
  - **Response:** `{ "success": true }`
135
135
 
136
136
  ## Authentication Flow
137
137
 
138
138
  1. **Login:**
139
- - User submits credentials to `/v1/users/login`.
139
+ - User submits credentials to `/api/v1/users/login`.
140
140
  - Receives JWT and refresh token.
141
141
  2. **Token Refresh:**
142
- - Use `/v1/users/token-refresh` with refresh token to get new JWT.
142
+ - Use `/api/v1/users/token-refresh` with refresh token to get new JWT.
143
143
  3. **OAuth:**
144
- - Get redirect URL from `/v1/users/login/oauth`.
145
- - Complete OAuth flow via `/v1/users/login/oauth2callback`.
144
+ - Get redirect URL from `/api/v1/users/login/oauth`.
145
+ - Complete OAuth flow via `/api/v1/users/login/oauth2callback`.
146
146
  4. **Protected Routes:**
147
147
  - Use `@auth.require_auth()` decorator to protect Flask routes.
148
148
 
@@ -1,10 +1,10 @@
1
1
  the37lab_authlib/__init__.py,sha256=cFVTWL-0YIMqwOMVy1P8mOt_bQODJp-L9bfp2QQ8CTo,132
2
- the37lab_authlib/auth.py,sha256=VP1_E7_iYkt5fzm6wYCx5Jx8kQtUVQjUcLIwYN9FVyw,20656
2
+ the37lab_authlib/auth.py,sha256=dQkE6z9GZZpnl0nfqulcveho8W5lM95XUBLmtE-5JIc,20660
3
3
  the37lab_authlib/db.py,sha256=fTXxnfju0lmbFGPVbXpTMeDmJMeBgURVZTndyxyRyCc,2734
4
4
  the37lab_authlib/decorators.py,sha256=AEQfix31fHUZvhEZd4Ud8Zh2KBGjV6O_braiPL-BU7w,1219
5
5
  the37lab_authlib/exceptions.py,sha256=mdplK5sKNtagPAzSGq5NGsrQ4r-k03DKJBKx6myWwZc,317
6
6
  the37lab_authlib/models.py,sha256=-PlvQlHGIsSdrH0H9Cdh_vTPlltGV8G1Z1mmGQvAg9Y,3422
7
- the37lab_authlib-0.1.1750156111.dist-info/METADATA,sha256=ZzZKnxoba2xGq-V05gzIf_Wqy4P6HNkq_aKU64BbwqI,5585
8
- the37lab_authlib-0.1.1750156111.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
- the37lab_authlib-0.1.1750156111.dist-info/top_level.txt,sha256=6Jmxw4UeLrhfJXgRKbXWY4OhxRSaMs0dKKhNCGWWSwc,17
10
- the37lab_authlib-0.1.1750156111.dist-info/RECORD,,
7
+ the37lab_authlib-0.1.1750187527.dist-info/METADATA,sha256=I1q0GUs96_gBGEDq4no_p0t_UXXyw5IlWsPVbaJJTnM,5641
8
+ the37lab_authlib-0.1.1750187527.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
+ the37lab_authlib-0.1.1750187527.dist-info/top_level.txt,sha256=6Jmxw4UeLrhfJXgRKbXWY4OhxRSaMs0dKKhNCGWWSwc,17
10
+ the37lab_authlib-0.1.1750187527.dist-info/RECORD,,