From 2a7e91fa136fe526aedca9ef5d753dcc86f2b7fe Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Wed, 16 Sep 2020 15:19:43 +0300 Subject: [PATCH] [#144] sdk/token: Use MarshalBinary to uuid of session token Signed-off-by: Alex Vanin --- pkg/token/session.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/token/session.go b/pkg/token/session.go index eec6fd32..450a9a70 100644 --- a/pkg/token/session.go +++ b/pkg/token/session.go @@ -31,5 +31,10 @@ func (s SessionToken) SessionKey() []byte { } func (s SessionToken) ID() []byte { - return s.id[:] + data, err := s.id.MarshalBinary() + if err != nil { + panic(err) // must never panic + } + + return data }