[#11] Receive hex encoded bearer token signature
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
70e25e6caf
commit
61bc5af44b
4 changed files with 7 additions and 5 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"context"
|
||||
"crypto/ecdsa"
|
||||
"encoding/base64"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
@ -359,7 +360,7 @@ func prepareSessionToken(bt *BearerToken, isWalletConnect bool) (*session.Token,
|
|||
return nil, fmt.Errorf("can't base64-decode bearer token: %w", err)
|
||||
}
|
||||
|
||||
signature, err := base64.StdEncoding.DecodeString(bt.Signature)
|
||||
signature, err := hex.DecodeString(bt.Signature)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("couldn't decode bearer signature: %w", err)
|
||||
}
|
||||
|
|
Reference in a new issue