feat(auth): 添加用户登录功能
This commit is contained in:
1 parent
92a9e20934
commit
63c8f2980b
10 files changed
+210
-18
No files matched your search
@@ -1,9 +1,11 @@
|
||||
# EnGin 项目主配置文件
|
||||
# EnGin 项目开发环境配置模板
|
||||
# 使用方式:复制为 config.yaml 并填入真实值
|
||||
# cp configs/config.yaml.dev configs/config.yaml
|
||||
|
||||
# Web 服务配置
|
||||
server:
|
||||
port: 8080 # 服务监听的端口
|
||||
mode: "release" # 运行模式:debug (开发模式,带控制台彩色日志) / release (生产模式,只输出 JSON 日志)
|
||||
mode: "debug" # 运行模式:debug (开发模式,带控制台彩色日志) / release (生产模式,只输出 JSON 日志)
|
||||
version: 2.0.4
|
||||
allow_origins:
|
||||
- http://localhost:3000
|
||||
@@ -12,9 +14,9 @@ database:
|
||||
driver: "postgres" # 驱动,支持 mysql 或 postgres
|
||||
host: "127.0.0.1" # 数据库主机地址
|
||||
port: 5432 # 端口号:MySQL 默认 3306,PostgreSQL 默认 5432
|
||||
user: "unclesam" # 用户名
|
||||
password: "wangchan" # 密码
|
||||
dbname: "test_db" # 数据库名
|
||||
user: "your_user" # 用户名
|
||||
password: "your_password" # 密码
|
||||
dbname: "your_db" # 数据库名
|
||||
|
||||
# Zap 日志配置
|
||||
logger:
|
||||
@@ -27,14 +29,14 @@ logger:
|
||||
compress: true # 是否对历史归档日志进行 gzip 压缩
|
||||
|
||||
jwt:
|
||||
issuer: "山姆叔叔"
|
||||
access_secret: "django-insecure-pfgn+96(rq74los_7d#n8#b07+$23vnxy*#y^y=eu9&_1eqk$7"
|
||||
refresh_secret: "3676f2d0e99f294aab75997e16340370"
|
||||
issuer: "your_issuer"
|
||||
access_secret: "your-access-secret-here"
|
||||
refresh_secret: "your-refresh-secret-here"
|
||||
access_expire: 2 # 小时
|
||||
refresh_expire: 168 # 小时(7天)
|
||||
|
||||
# Redis 缓存配置
|
||||
redis:
|
||||
addr: "127.0.0.1:6379" # Redis 连接地址
|
||||
password: "wangchan5" # Redis 密码 (没有则为空)
|
||||
db: 0 # 数据库编号
|
||||
password: "" # Redis 密码 (没有则为空)
|
||||
db: 0 # 数据库编号
|
||||
Reference in new issue
Block a user