feat: add unified authorization middleware
This commit is contained in:
@@ -7,12 +7,6 @@ Server:
|
||||
BindIP: 0.0.0.0
|
||||
Port: 12001
|
||||
|
||||
# Dynamic JSON-to-protobuf unary RPC endpoint: POST /rpc/{module}/{service}/{method}
|
||||
# An empty allow list denies every dynamic call. Use "*" to expose all
|
||||
# reflection-visible unary methods, or list full service/method names.
|
||||
DynamicRPC:
|
||||
Allow:
|
||||
- "*"
|
||||
|
||||
Databases:
|
||||
Driver: postgres
|
||||
@@ -22,6 +16,32 @@ Databases:
|
||||
Cache: redis://null:Weidong1214@127.0.0.1:6379/1
|
||||
SecretKey: CHANGE_ME
|
||||
|
||||
# Authorization contains the HS256 signing key and maximum token lifetime in
|
||||
# seconds. Clients send the raw JWT in the Authorization header (no Bearer).
|
||||
Authorization:
|
||||
Key: CHANGE_ME_32_BYTE_JWT_SECRET_KEY
|
||||
Expire: 86400
|
||||
Anonymous:
|
||||
- /passport.Login/Pwd
|
||||
- /passport.Login/Code
|
||||
- /passport.Login/Quick
|
||||
- /passport.Register/Pwd
|
||||
- /passport.Register/Code
|
||||
- /passport.Forget/Verify
|
||||
- /passport.Forget/Reset
|
||||
- /passport.Verify/Request
|
||||
- /passport.Verify/JumioCallback
|
||||
- /market.Agency/Login
|
||||
- /mall.Staff/Login
|
||||
- /rest/fts/ping
|
||||
- /rest/fts/config
|
||||
- /rest/logs/ping
|
||||
- /rest/mgt/ping
|
||||
- /rest/mgt/session
|
||||
- /rest/mgt/login
|
||||
- /rest/mgt/refresh
|
||||
- /rest/mgt/reset
|
||||
|
||||
# Enabled services. Use "all" to enable every registered service.
|
||||
Services:
|
||||
- ads
|
||||
|
||||
Reference in New Issue
Block a user