mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-09 10:43:47 +08:00
模块化定时任务,方便在插件中注册任务;增加日志分组
This commit is contained in:
@@ -81,7 +81,6 @@ func Login(ctx context.Context, user *model.Identity) (string, int64, error) {
|
||||
if err = cache.Instance().Set(ctx, bindKey, tokenKey, duration); err != nil {
|
||||
return "", 0, err
|
||||
}
|
||||
|
||||
return header, config.Expires, nil
|
||||
}
|
||||
|
||||
@@ -270,7 +269,6 @@ func parseToken(ctx context.Context, header string) (*Claims, error) {
|
||||
if !ok {
|
||||
return nil, errorLogin
|
||||
}
|
||||
|
||||
return claims, nil
|
||||
}
|
||||
|
||||
@@ -283,7 +281,6 @@ func GetAuthorization(r *ghttp.Request) string {
|
||||
if authorization == "" {
|
||||
return r.Get("authorization").String()
|
||||
}
|
||||
|
||||
return gstr.Replace(authorization, "Bearer ", "")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user