diff --git a/cmd/broker.go b/cmd/broker.go index 80e61ddf6..b74731050 100644 --- a/cmd/broker.go +++ b/cmd/broker.go @@ -17,7 +17,6 @@ import ( ttnlog "github.com/TheThingsNetwork/go-utils/log" "github.com/TheThingsNetwork/ttn/core/broker" "github.com/TheThingsNetwork/ttn/core/component" - "github.com/dgrijalva/jwt-go" "github.com/spf13/cobra" "github.com/spf13/viper" ) @@ -57,11 +56,7 @@ var brokerCmd = &cobra.Command{ broker := broker.NewBroker( time.Duration(viper.GetInt("broker.deduplication-delay")) * time.Millisecond, ) - nsToken := viper.GetString("broker.networkserver-token") - if _, err := jwt.Parse(nsToken, func(*jwt.Token) (interface{}, error) { return nil, nil }); nsToken != "" && err != nil { - ctx.WithError(err).Fatal("Could not read networkserver token") - } - broker.SetNetworkServer(viper.GetString("broker.networkserver-address"), nsCert, nsToken) + broker.SetNetworkServer(viper.GetString("broker.networkserver-address"), nsCert, viper.GetString("broker.networkserver-token")) err = broker.Init(component) if err != nil { ctx.WithError(err).Fatal("Could not initialize broker")