[#326] Fix regression after #324

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-07-07 13:42:09 +03:00 committed by Alex Vanin
parent 03ee3e5357
commit f00b9ba054

View file

@ -1301,8 +1301,6 @@ func (c *clientImpl) attachV2SessionToken(opts *callOptions, hdr *v2session.Requ
return nil
}
token := new(v2session.SessionToken)
opCtx := new(v2session.ObjectSessionContext)
opCtx.SetAddress(info.addr)
opCtx.SetVerb(info.verb)
@ -1319,6 +1317,9 @@ func (c *clientImpl) attachV2SessionToken(opts *callOptions, hdr *v2session.Requ
body.SetContext(opCtx)
body.SetLifetime(lt)
token := new(v2session.SessionToken)
token.SetBody(body)
signWrapper := signature.StableMarshalerWrapper{SM: token.GetBody()}
err := signer.SignDataWithHandler(opts.key, signWrapper, func(key []byte, sig []byte) {