Skip to content
This repository was archived by the owner on Jun 20, 2025. It is now read-only.

Commit fb1fe19

Browse files
author
jumbycc@163.com
committed
turn off debug
1 parent df47c90 commit fb1fe19

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

crypto/ecdsa.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
_ "crypto/sha256"
88
_ "crypto/sha512"
99
"encoding/base64"
10-
"fmt"
1110
"math/big"
1211

1312
"gopkg.in/jwt.v1/util"
@@ -74,7 +73,7 @@ func (s *SigningECDSA) Verify(data, sign string, key interface{}) error { // Ret
7473
func (s *SigningECDSA) Sign(data string, key interface{}) (string, error) { // Returns encoded signature or error
7574

7675
if ecdsaKey, ok := key.(*ecdsa.PrivateKey); ok && ecdsaKey != nil {
77-
fmt.Println("ecdsaKey", ecdsaKey)
76+
util.Debug(("ecdsaKey", ecdsaKey)
7877
if !s.Hash.Available() {
7978
return "", ErrorHashUnavailable
8079
}

crypto/rsa.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import (
55
"crypto/rand"
66
"crypto/rsa"
77
"encoding/base64"
8-
"fmt"
9-
108
"gopkg.in/jwt.v1/util"
119
)
1210

@@ -30,7 +28,7 @@ func (s *SigningRSA) Verify(data, sign string, key interface{}) error { // Retur
3028
if !ok {
3129
return ErrorInvalidKey
3230
}
33-
fmt.Println(data, sign)
31+
util.Debug(data, sign)
3432

3533
st, e := base64.RawURLEncoding.DecodeString(sign)
3634
if e != nil {

jwt.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ package jwt
33
import (
44
"strings"
55

6-
"fmt"
7-
8-
"log"
9-
106
"gopkg.in/jwt.v1/crypto"
117
"gopkg.in/jwt.v1/util"
128
)
@@ -65,7 +61,7 @@ func NewToken(v ...interface{}) Token {
6561
case TokenString:
6662
token.Token = v.(TokenString)
6763
default:
68-
log.Println("key")
64+
util.Debug("key",key)
6965
token.key = v
7066
}
7167
}
@@ -94,7 +90,7 @@ func ParseToken(serialized string, key interface{}) (Token, error) {
9490
if err = t.Verify(); err != nil {
9591
return nil, err
9692
}
97-
fmt.Println(t)
93+
util.Debug(t)
9894
return t, nil
9995

10096
}

0 commit comments

Comments
 (0)