[#106] Pass bearer token through generated requests
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
e6f04f7785
commit
ae0dd9e051
8 changed files with 32 additions and 3 deletions
|
@ -21,6 +21,8 @@ type remoteTarget struct {
|
|||
|
||||
token *token.SessionToken
|
||||
|
||||
bearer *token.BearerToken
|
||||
|
||||
addr *network.Address
|
||||
|
||||
obj *object.Object
|
||||
|
@ -55,6 +57,7 @@ func (t *remoteTarget) Close() (*transformer.AccessIdentifiers, error) {
|
|||
t.obj.SDK(),
|
||||
),
|
||||
client.WithTTL(1), // FIXME: use constant
|
||||
client.WithBearer(t.bearer),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "(%T) could not put object to %s", t, addr)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue