feat: Implement Oauth2 login log service and repository
- Added Oauth2LogLoginService for managing user authorization logs. - Implemented methods for inserting logs, cleaning logs, and exporting log data. - Created a new file for Oauth2 login log service. refactor: Remove unused open_api module - Deleted the open_api.go file as it was not utilized in the project. fix: Update error codes in SysProfileController - Changed error codes for binding errors and user authentication errors to more descriptive values. fix: Update cache handling in SysConfig and SysDictType services - Modified Redis set operations to include expiration time for cached values. refactor: Update middleware authorization checks - Replaced PreAuthorize middleware with AuthorizeUser across multiple routes in system and tool modules for consistency. chore: Clean up trace and ws modules - Updated middleware authorization in trace and ws modules to use AuthorizeUser.
This commit is contained in:
@@ -3,19 +3,19 @@ package constants
|
||||
// 令牌常量信息
|
||||
|
||||
// HEADER_PREFIX 令牌-请求头标识前缀
|
||||
const HEADER_PREFIX = "Bearer "
|
||||
const HEADER_PREFIX = "Bearer"
|
||||
|
||||
// HEADER_KEY 令牌-请求头标识
|
||||
const HEADER_KEY = "Authorization"
|
||||
|
||||
// JWT_UUID 令牌-JWT唯一标识字段
|
||||
const JWT_UUID = "uuid"
|
||||
// JWT_DEVICE_ID 令牌-JWT设备标识字段
|
||||
const JWT_DEVICE_ID = "device_id"
|
||||
|
||||
// JWT_USER_ID 令牌-JWT标识用户主键字段
|
||||
const JWT_USER_ID = "user_id"
|
||||
|
||||
// JWT_USER_NAME 令牌-JWT标识用户登录账号字段
|
||||
const JWT_USER_NAME = "user_name"
|
||||
// JWT_CLIENT_ID 令牌-JWT标识客户端ID字段
|
||||
const JWT_CLIENT_ID = "client_id"
|
||||
|
||||
// NMS北向使用-数据响应字段和请求头授权
|
||||
const ACCESS_TOKEN = "accessToken"
|
||||
|
||||
Reference in New Issue
Block a user