forked from TrueCloudLab/frostfs-rest-gw
[#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
|
@ -370,7 +370,7 @@ func prepareBearerToken(bt *BearerToken, isWalletConnect bool) (*token.BearerTok
|
|||
btoken.ToV2().SetSignature(v2signature)
|
||||
|
||||
if isWalletConnect {
|
||||
if !walletconnect.Verify((*ecdsa.PublicKey)(ownerKey), data, signature) {
|
||||
if !walletconnect.Verify((*ecdsa.PublicKey)(ownerKey), []byte(bt.Token), signature) {
|
||||
return nil, fmt.Errorf("invalid signature")
|
||||
}
|
||||
} else if err = btoken.VerifySignature(); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue