mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-28 12:00:25 +08:00
feat: 资源密码加密处理&登录密码加密加强等
This commit is contained in:
@@ -52,6 +52,14 @@ func (r *Redis) Save(rc *ctx.ReqCtx) {
|
||||
r.RedisApp.Save(redis)
|
||||
}
|
||||
|
||||
// 获取redis实例密码,由于数据库是加密存储,故提供该接口展示原文密码
|
||||
func (r *Redis) GetRedisPwd(rc *ctx.ReqCtx) {
|
||||
rid := uint64(ginx.PathParamInt(rc.GinCtx, "id"))
|
||||
re := r.RedisApp.GetById(rid, "Password")
|
||||
re.PwdDecrypt()
|
||||
rc.ResData = re.Password
|
||||
}
|
||||
|
||||
func (r *Redis) DeleteRedis(rc *ctx.ReqCtx) {
|
||||
r.RedisApp.Delete(uint64(ginx.PathParamInt(rc.GinCtx, "id")))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user