mirror of
https://github.com/HChaZZY/alist.git
synced 2025-12-21 01:27:25 +08:00
feat: integrate alist with casdoor (#1453)
* feat: integrate alist with casdoor * fix: casdoor as an option for login Co-authored-by: wenxuan70 <t736660416@gmail.com>
This commit is contained in:
@@ -8,16 +8,6 @@ import (
|
||||
|
||||
func Auth(c *gin.Context) {
|
||||
token := c.GetHeader("Authorization")
|
||||
//password, err := model.GetSettingByKey("password")
|
||||
//if err != nil {
|
||||
// if err == gorm.ErrRecordNotFound {
|
||||
// common.ErrorResp(c, fmt.Errorf("password not set"), 400)
|
||||
// return
|
||||
// }
|
||||
// common.ErrorResp(c, err, 500)
|
||||
// return
|
||||
//}
|
||||
//if token != utils.GetMD5Encode(password.Value) {
|
||||
if token != conf.Token {
|
||||
common.ErrorStrResp(c, "Invalid token", 401)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user