Skip to content

Commit

Permalink
fix: incorrect key of oidc username (close #5670)
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Dec 10, 2023
1 parent 026e944 commit 296be88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions drivers/aliyundrive_open/driver.go
Expand Up @@ -80,7 +80,7 @@ func (d *AliyundriveOpen) link(ctx context.Context, file model.Obj) (*model.Link
req.SetBody(base.Json{
"drive_id": d.DriveId,
"file_id": file.GetID(),
"expire_sec": 900,
"expire_sec": 14400,
})
})
if err != nil {
Expand Down Expand Up @@ -207,7 +207,7 @@ func (d *AliyundriveOpen) Other(ctx context.Context, args model.OtherArgs) (inte
case "video_preview":
uri = "/adrive/v1.0/openFile/getVideoPreviewPlayInfo"
data["category"] = "live_transcoding"
data["url_expire_sec"] = 900
data["url_expire_sec"] = 14400
default:
return nil, errs.NotSupport
}
Expand Down
2 changes: 1 addition & 1 deletion server/handles/ssologin.go
Expand Up @@ -231,7 +231,7 @@ func OIDCLoginCallback(c *gin.Context) {
common.ErrorResp(c, err, 400)
return
}
userID := utils.Json.Get(payload, conf.SSOOIDCUsernameKey).ToString()
userID := utils.Json.Get(payload, setting.GetStr(conf.SSOOIDCUsernameKey, "name")).ToString()
if userID == "" {
common.ErrorStrResp(c, "cannot get username from OIDC provider", 400)
return
Expand Down

0 comments on commit 296be88

Please sign in to comment.