@@ -48,35 +48,35 @@ type JWTSigningKey interface {
48
48
PreProcessToken (* jwt.Token )
49
49
}
50
50
51
- type hmacSingingKey struct {
51
+ type hmacSigningKey struct {
52
52
signingMethod jwt.SigningMethod
53
53
secret []byte
54
54
}
55
55
56
- func (key hmacSingingKey ) IsSymmetric () bool {
56
+ func (key hmacSigningKey ) IsSymmetric () bool {
57
57
return true
58
58
}
59
59
60
- func (key hmacSingingKey ) SigningMethod () jwt.SigningMethod {
60
+ func (key hmacSigningKey ) SigningMethod () jwt.SigningMethod {
61
61
return key .signingMethod
62
62
}
63
63
64
- func (key hmacSingingKey ) SignKey () interface {} {
64
+ func (key hmacSigningKey ) SignKey () interface {} {
65
65
return key .secret
66
66
}
67
67
68
- func (key hmacSingingKey ) VerifyKey () interface {} {
68
+ func (key hmacSigningKey ) VerifyKey () interface {} {
69
69
return key .secret
70
70
}
71
71
72
- func (key hmacSingingKey ) ToJWK () (map [string ]string , error ) {
72
+ func (key hmacSigningKey ) ToJWK () (map [string ]string , error ) {
73
73
return map [string ]string {
74
74
"kty" : "oct" ,
75
75
"alg" : key .SigningMethod ().Alg (),
76
76
}, nil
77
77
}
78
78
79
- func (key hmacSingingKey ) PreProcessToken (* jwt.Token ) {}
79
+ func (key hmacSigningKey ) PreProcessToken (* jwt.Token ) {}
80
80
81
81
type rsaSingingKey struct {
82
82
signingMethod jwt.SigningMethod
@@ -240,7 +240,7 @@ func CreateJWTSingingKey(algorithm string, key interface{}) (JWTSigningKey, erro
240
240
if ! ok {
241
241
return nil , jwt .ErrInvalidKeyType
242
242
}
243
- return hmacSingingKey {signingMethod , secret }, nil
243
+ return hmacSigningKey {signingMethod , secret }, nil
244
244
}
245
245
}
246
246
0 commit comments