[#1211] neofs-cli: Set bearer and session token in all object service requests

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2022-03-03 11:10:55 +03:00 committed by Alex Vanin
parent 08f0a0b557
commit 4935016bf8

View file

@ -584,6 +584,14 @@ func HeadObject(prm HeadObjectPrm) (*HeadObjectRes, error) {
cliPrm.ByID(*id)
}
if prm.sessionToken != nil {
cliPrm.WithinSession(*prm.sessionToken)
}
if prm.bearerToken != nil {
cliPrm.WithBearerToken(*prm.bearerToken)
}
if prm.raw {
cliPrm.MarkRaw()
}
@ -817,6 +825,14 @@ func PayloadRange(prm PayloadRangePrm) (*PayloadRangeRes, error) {
cliPrm.ByID(*id)
}
if prm.sessionToken != nil {
cliPrm.WithinSession(*prm.sessionToken)
}
if prm.bearerToken != nil {
cliPrm.WithBearerToken(*prm.bearerToken)
}
if prm.raw {
cliPrm.MarkRaw()
}