[#15] Sign base64 token representation
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
5bee10d096
commit
fd0ff4b803
4 changed files with 21 additions and 4 deletions
|
@ -423,7 +423,7 @@ func prepareSessionToken(st *SessionToken, isWalletConnect bool) (*session.Token
|
|||
stoken.ToV2().SetSignature(v2signature)
|
||||
|
||||
if isWalletConnect {
|
||||
if !walletconnect.Verify((*ecdsa.PublicKey)(ownerKey), data, signature) {
|
||||
if !walletconnect.Verify((*ecdsa.PublicKey)(ownerKey), []byte(st.Token), signature) {
|
||||
return nil, fmt.Errorf("invalid signature")
|
||||
}
|
||||
} else if !stoken.VerifySignature() {
|
||||
|
|
Reference in a new issue