From 8477a84c83a4c4e3e33749d62c03c8b4b4d21924 Mon Sep 17 00:00:00 2001 From: Hylke Visser Date: Fri, 22 Dec 2017 11:10:31 +0100 Subject: [PATCH] Revert "broker: Fatal error when a networkserver token can't be read" This reverts commit 33b404aff30fcfeba8a9c940d81139bb3e4532db. --- cmd/broker.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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")