forked from TrueCloudLab/frostfs-http-gw
[#13] Add bearer token usage in receive/upload methods
This commit is contained in:
parent
e45e5ed6f9
commit
237c247ec4
5 changed files with 65 additions and 18 deletions
|
@ -44,6 +44,12 @@ func (a *app) upload(c *fasthttp.RequestCtx) {
|
|||
log = a.log.With(zap.String("cid", sCID))
|
||||
)
|
||||
|
||||
if err = checkAndPropagateBearerToken(c); err != nil {
|
||||
log.Error("could not fetch bearer token", zap.Error(err))
|
||||
c.Error("could not fetch bearer token", fasthttp.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
if err = cid.Parse(sCID); err != nil {
|
||||
log.Error("wrong container id", zap.Error(err))
|
||||
c.Error("wrong container id", fasthttp.StatusBadRequest)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue