|
|
@ -2,6 +2,7 @@ package jwt
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
"crypto/rsa"
|
|
|
|
"crypto/rsa"
|
|
|
|
|
|
|
|
"errors"
|
|
|
|
"fmt"
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
|
|
|
|
"git.simts.cc/common/lib/types"
|
|
|
|
"git.simts.cc/common/lib/types"
|
|
|
@ -61,3 +62,7 @@ func Decode(tokenString string, key string) (types.Data, error) {
|
|
|
|
|
|
|
|
|
|
|
|
return types.Data(claims), nil
|
|
|
|
return types.Data(claims), nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func IsExpired(err error) bool {
|
|
|
|
|
|
|
|
return errors.Is(err, jwt.ErrTokenExpired)
|
|
|
|
|
|
|
|
}
|
|
|
|