Explorar o código

把test文件调整到目录里面

lingmin_package@163.com hai 1 mes
pai
achega
d55d5b8591

+ 2 - 1
.env

@@ -11,7 +11,8 @@ PORT=8000
 RELOAD=True
 
 # 数据库配置 - 请根据实际情况修改
-DATABASE_URL=mysql+aiomysql://root:admin@localhost:3306/lq_db
+#DATABASE_URL=mysql+aiomysql://root:admin@localhost:3306/lq_db
+DATABASE_URL=mysql+aiomysql://root:lq@123@192.168.92.61:13306/lq_oauth_db
 DATABASE_ECHO=False
 
 # Redis配置

+ 46 - 0
README.md

@@ -0,0 +1,46 @@
+
+
+### 创建虚拟环境
+  - conda create --name lq_oauth2 python=3.12
+  - conda activate lq_oauth2  激活环境
+  - python --version
+  - python -V
+  - conda deactivate  退出环境
+
+
+### 授权中心
+#### 授权后台
+  - cd sso-backend
+  - python full_server.py
+  - http://localhost:8000/docs  
+
+#### 授权前台
+  - cd sso-frontend
+  - npm install 
+  - npm run dev
+  - http://localhost:3000  admin Admin123456
+
+
+
+### 授权子系统案例
+#### 子系统后台
+  - cd subsystem-demo/backend
+  - python main.py
+  - http://localhost:8001/docs  
+
+#### 子系统前台
+  - cd subsystem-demo/frontend
+  - npm install 
+  - npm run dev
+  - http://localhost:3000  admin Admin123456
+
+
+
+
+下一步:
+1. 启动后端服务: cd src && python -m app.main
+2. 启动前端服务: cd ../sso-frontend && npm run dev
+3. 配置子系统: CLIENT_ID=eqhoIdAyAWbA8MsYHsNqQqNLJbCayTjY
+   CLIENT_SECRET=LKJm5XHJFhhgxSv9nQhoQNNI3wrKyWGZCaPQ4qc43Lf5qfXdLAHoGAHhCYqApEpr
+
+   CLIENT_SECRET=LKJm5XHJFhhgxSv9nQhoQNNI3wrKyWGZCaPQ4qc43Lf5qfXdLAHoGAHhCYqApEpr

+ 0 - 0
TROUBLESHOOTING.md → test/TROUBLESHOOTING.md


+ 0 - 0
check_app.py → test/check_app.py


+ 0 - 0
check_backend.py → test/check_backend.py


+ 0 - 0
check_config.py → test/check_config.py


+ 0 - 0
check_user.py → test/check_user.py


+ 0 - 0
create_rbac_tables.py → test/create_rbac_tables.py


+ 0 - 0
create_test_app.py → test/create_test_app.py


+ 0 - 0
drop_rbac_tables.py → test/drop_rbac_tables.py


+ 0 - 0
fix_password.py → test/fix_password.py


+ 0 - 0
install_deps.py → test/install_deps.py


+ 0 - 0
load_env.py → test/load_env.py


+ 0 - 0
net → test/net


+ 0 - 0
quick_start.py → test/quick_start.py


+ 0 - 0
rbac_api.py → test/rbac_api.py


+ 0 - 0
reinit_menus_by_requirements.py → test/reinit_menus_by_requirements.py


+ 0 - 0
reinit_rbac_data.py → test/reinit_rbac_data.py


+ 0 - 0
reinit_rbac_data_fixed.py → test/reinit_rbac_data_fixed.py


+ 0 - 0
run_server.py → test/run_server.py


+ 0 - 0
simple_init_db.py → test/simple_init_db.py


+ 0 - 0
test_app_user_applications.py → test/test_app_user_applications.py


+ 0 - 0
test_app_user_menus.py → test/test_app_user_menus.py


+ 0 - 0
test_app_user_profile.py → test/test_app_user_profile.py


+ 0 - 0
test_captcha.py → test/test_captcha.py


+ 0 - 0
test_db_connection.py → test/test_db_connection.py


+ 0 - 0
test_frontend_role_api.py → test/test_frontend_role_api.py


+ 0 - 0
test_login.py → test/test_login.py


+ 0 - 0
test_oauth.py → test/test_oauth.py


+ 0 - 0
test_regular_user_applications.py → test/test_regular_user_applications.py


+ 0 - 0
test_server.py → test/test_server.py


+ 0 - 0
test_server_8001.py → test/test_server_8001.py


+ 0 - 0
test_user_menus.py → test/test_user_menus.py


+ 0 - 0
test_user_role_menus_api.py → test/test_user_role_menus_api.py


+ 0 - 0
test_zhangsan_menus.py → test/test_zhangsan_menus.py


+ 0 - 0
update_app_callback.py → test/update_app_callback.py


+ 0 - 0
update_menu_structure.py → test/update_menu_structure.py


+ 0 - 0
update_menu_tree.py → test/update_menu_tree.py