Skip to content

Commit 4ace1fe

Browse files
Add BaseUser import from piccolo.apps.user.tables
Imported BaseUser from piccolo.apps.user.tables for use in authentication and JWT middleware integration. This enables the app to validate users against the default Piccolo user table when protecting routes with JWTMiddleware.
1 parent 18d31ba commit 4ace1fe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/source/jwt/examples/example.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from piccolo_api.fastapi.endpoints import FastAPIKwargs, FastAPIWrapper
88
from piccolo_api.jwt_auth.endpoints import jwt_login
99
from piccolo_api.jwt_auth.middleware import JWTBlacklist, JWTMiddleware
10+
from piccolo.apps.user.tables import BaseUser
1011
from starlette.routing import Mount, Route
1112

1213
public_app = FastAPI(

0 commit comments

Comments
 (0)