Commit graph

8 commits

Author SHA1 Message Date
Leonard Lyubich
ec957be60c [#168] acl: Implement binary/JSON encoders/decoders on BearerToken
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Alex Vanin
7b212431df [#179] sdk/token: Add function to return token issuer
With new neofs-api changes, token issuer will not be stored
in ownerID field of bearer token. We can identify owner by
public key that has been used in signature.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-22 15:41:59 +03:00
Alex Vanin
e023b6e51e [#179] sdk/client: Ease bearer token sanity check
Now owner ID field is not required to be set. According to
latest neofs-api, this field set if token was issued for
specific owner ID. If this field is not set, then any user
can use this token while it is correctly signed and has valid
lifetime.

Lifetime is also can be omitted since node interpret empty
lifetime as a lifetime with zero values.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-22 15:41:59 +03:00
Alex Vanin
7b3736567c [#169] sdk/client: Do not resign session token
In some cases SDK Client provided with signed and prepared
session token. In this case we don't need to change verb
or sign it.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-14 21:09:56 +03:00
Alex Vanin
96de0bd25a [#143] sdk/token: Define bearer token structure
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Leonard Lyubich
0259a06783 [#150] sdk/token: Add owner ID
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
2a7e91fa13 [#144] sdk/token: Use MarshalBinary to uuid of session token
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
dfcc21242b [#144] sdk/token: Define session token structure
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00