Document that `BearerToken.ToV2` method return `nil`
when called on `nil`. Write corresponding unit tests.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Remove usage of deprecated of `container.ID` and `token.SessionToken` code
elements. Replace using of custom message generators with the ones provided
by packages. Replace string comparison with `Equal` method call.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
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>