forked from TrueCloudLab/frostfs-node
[#525] morph/container: Accept container session token in Put
`Put` method of latest `Container` contract accepts binary session token as an argument. Provide `PutArgs.SetSessionToken` method. Accept session token as a `[]byte` in `Wrapper.Put` method and attach it to `PutArgs`. Marshal session token from container in `wrapper.Put` function and pass it to the method. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
1deb3f3d01
commit
db67a117f0
3 changed files with 17 additions and 4 deletions
|
@ -66,7 +66,7 @@ func (cp *Processor) checkPutContainer(e *containerEvent.Put) error {
|
|||
|
||||
func (cp *Processor) approvePutContainer(e *containerEvent.Put) {
|
||||
// FIXME: here we should bind key to owner if needed
|
||||
err := cp.cnrClient.Put(e.Container(), e.PublicKey(), e.Signature())
|
||||
err := cp.cnrClient.Put(e.Container(), e.PublicKey(), e.Signature(), nil)
|
||||
if err != nil {
|
||||
cp.log.Error("could not approve put container",
|
||||
zap.String("error", err.Error()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue