forked from TrueCloudLab/frostfs-api-go
[#283] client/container: Attach container session token to request
Write session token of `container.Container` to container PUT request body during `client.PutContainer` call. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
d8f85e80c9
commit
ddccfe0072
1 changed files with 5 additions and 1 deletions
|
@ -112,7 +112,11 @@ func (c *clientImpl) PutContainer(ctx context.Context, cnr *container.Container,
|
||||||
|
|
||||||
req := new(v2container.PutRequest)
|
req := new(v2container.PutRequest)
|
||||||
req.SetBody(reqBody)
|
req.SetBody(reqBody)
|
||||||
req.SetMetaHeader(v2MetaHeaderFromOpts(callOptions))
|
|
||||||
|
meta := v2MetaHeaderFromOpts(callOptions)
|
||||||
|
meta.SetSessionToken(cnr.SessionToken().ToV2())
|
||||||
|
|
||||||
|
req.SetMetaHeader(meta)
|
||||||
|
|
||||||
err = v2signature.SignServiceMessage(callOptions.key, req)
|
err = v2signature.SignServiceMessage(callOptions.key, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue