[#150] sdk/token: Add owner ID
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
73220620c5
commit
0259a06783
4 changed files with 104 additions and 34 deletions
|
@ -70,10 +70,10 @@ func (c Client) createSessionV2(ctx context.Context, expiration uint64, opts ...
|
|||
return nil, errors.New("malformed response body")
|
||||
}
|
||||
|
||||
sessionToken, err := token.CreateSessionToken(body.GetID(), body.GetSessionKey())
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "malformed response body")
|
||||
}
|
||||
sessionToken := token.NewSessionToken()
|
||||
sessionToken.SetID(body.GetID())
|
||||
sessionToken.SetSessionKey(body.GetSessionKey())
|
||||
sessionToken.SetOwnerID(ownerID)
|
||||
|
||||
return sessionToken, nil
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue