forked from TrueCloudLab/frostfs-node
[#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:
parent
08f0a0b557
commit
4935016bf8
1 changed files with 16 additions and 0 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue