func (t *Token) VerifySignature() bool {
	tV2 := (*session.SessionToken)(t)
	signedData := v2signature.StableMarshalerWrapper{
		SM: tV2.GetBody(),
	}
	return signature.VerifyDataWithSource(signedData, func() (key, sig []byte) {
		tSig := tV2.GetSignature()
		return tSig.GetKey(), tSig.GetSign()
	}) == nil
}
VerifySignature checks if token signature is
presented and valid.
package session
import (
	"crypto/ecdsa"
	"github.com/nspcc-dev/neofs-api-go/pkg"
	"github.com/nspcc-dev/neofs-api-go/pkg/owner"
	"github.com/nspcc-dev/neofs-api-go/util/signature"
	"github.com/nspcc-dev/neofs-api-go/v2/refs"
	"github.com/nspcc-dev/neofs-api-go/v2/session"
	v2signature "github.com/nspcc-dev/neofs-api-go/v2/signature"
)
type Token session.SessionToken
func NewTokenFromV2(tV2 *session.SessionToken) *Token {
	return (*Token)(tV2)
}
func NewToken() *Token {
	return NewTokenFromV2(new(session.SessionToken))
}
func (t *Token) ToV2() *session.SessionToken {
	return (*session.SessionToken)(t)
}
func (t *Token) setBodyField(setter func(*session.SessionTokenBody)) {
	token := (*session.SessionToken)(t)
	body := token.GetBody()
	if body == nil {
		body = new(session.SessionTokenBody)
		token.SetBody(body)
	}
	setter(body)
}
func (t *Token) ID() []byte {
	return (*session.SessionToken)(t).
		GetBody().
		GetID()
}
func (t *Token) SetID(v []byte) {
	t.setBodyField(func(body *session.SessionTokenBody) {
		body.SetID(v)
	})
}
func (t *Token) OwnerID() *owner.ID {
	return owner.NewIDFromV2(
		(*session.SessionToken)(t).
			GetBody().
			GetOwnerID(),
	)
}
func (t *Token) SetOwnerID(v *owner.ID) {
	t.setBodyField(func(body *session.SessionTokenBody) {
		body.SetOwnerID(v.ToV2())
	})
}
func (t *Token) SessionKey() []byte {
	return (*session.SessionToken)(t).
		GetBody().
		GetSessionKey()
}
func (t *Token) SetSessionKey(v []byte) {
	t.setBodyField(func(body *session.SessionTokenBody) {
		body.SetSessionKey(v)
	})
}
func (t *Token) setLifetimeField(f func(*session.TokenLifetime)) {
	t.setBodyField(func(body *session.SessionTokenBody) {
		lt := body.GetLifetime()
		if lt == nil {
			lt = new(session.TokenLifetime)
			body.SetLifetime(lt)
		}
		f(lt)
	})
}
func (t *Token) Exp() uint64 {
	return (*session.SessionToken)(t).
		GetBody().
		GetLifetime().
		GetExp()
}
func (t *Token) SetExp(exp uint64) {
	t.setLifetimeField(func(lt *session.TokenLifetime) {
		lt.SetExp(exp)
	})
}
func (t *Token) Nbf() uint64 {
	return (*session.SessionToken)(t).
		GetBody().
		GetLifetime().
		GetNbf()
}
func (t *Token) SetNbf(nbf uint64) {
	t.setLifetimeField(func(lt *session.TokenLifetime) {
		lt.SetNbf(nbf)
	})
}
func (t *Token) Iat() uint64 {
	return (*session.SessionToken)(t).
		GetBody().
		GetLifetime().
		GetIat()
}
func (t *Token) SetIat(iat uint64) {
	t.setLifetimeField(func(lt *session.TokenLifetime) {
		lt.SetIat(iat)
	})
}
func (t *Token) Sign(key *ecdsa.PrivateKey) error {
	tV2 := (*session.SessionToken)(t)
	signedData := v2signature.StableMarshalerWrapper{
		SM: tV2.GetBody(),
	}
	return signature.SignDataWithHandler(key, signedData, func(key, sig []byte) {
		tSig := tV2.GetSignature()
		if tSig == nil {
			tSig = new(refs.Signature)
		}
		tSig.SetKey(key)
		tSig.SetSign(sig)
		tV2.SetSignature(tSig)
	})
}