diff --git a/api/rest-api.go b/api/rest-api.go index d09759d..a7fb732 100644 --- a/api/rest-api.go +++ b/api/rest-api.go @@ -1,31 +1,19 @@ package api import ( + "bytes" "encoding/json" "fmt" "net/http" - "regexp" - "time" "weather-data/config" "weather-data/storage" "weather-data/weathersource" - "github.com/dgrijalva/jwt-go" "github.com/google/uuid" "github.com/gorilla/handlers" "github.com/gorilla/mux" ) -var bearerTokenRegexPattern = "^(?i:Bearer\\s+)([A-Za-z0-9-_=]+\\.[A-Za-z0-9-_=]+\\.?[A-Za-z0-9-_.+\\/=]*)$" - -var bearerTokenRegex *regexp.Regexp = regexp.MustCompile(bearerTokenRegexPattern) - -type customClaims struct { - Username string `json:"username"` - Roles []string `json:"role"` - jwt.StandardClaims -} - type weatherRestApi struct { connection string config config.RestConfig @@ -82,10 +70,6 @@ func (api *weatherRestApi) handleRequests() *mux.Router { //registration router.HandleFunc("/{_dummy:(?i)register/sensor}/{name}", api.registerWeatherSensorHandler).Methods("POST") - //token generation - if api.config.AllowTokenGeneration { - router.HandleFunc("/{_dummy:(?i)generateToken}", api.generateToken).Methods("GET") - } return router } @@ -107,30 +91,6 @@ func (api *weatherRestApi) randomWeatherListHandler(w http.ResponseWriter, r *ht json.NewEncoder(w).Encode(storage.ToMap(datapoints)) } -func (api *weatherRestApi) generateToken(w http.ResponseWriter, r *http.Request) { - claims := customClaims{ - StandardClaims: jwt.StandardClaims{ - ExpiresAt: time.Now().Add(time.Minute * 30).Unix(), - }, - Username: "Joel", - Roles: []string{"role 1", "role 2"}, - } - - token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims) - signedToken, err := token.SignedString([]byte(config.RestConfiguration.JwtTokenSecret)) - if err != nil { - return - } - - response := map[string]string{ - "Autohrization": signedToken, - } - - w.Header().Add("content-type", "application/json") - w.WriteHeader(http.StatusOK) - json.NewEncoder(w).Encode(response) -} - func (api *weatherRestApi) getWeatherDataHandler(w http.ResponseWriter, r *http.Request) { vars := mux.Vars(r) id := vars["id"] @@ -304,32 +264,26 @@ func (api *weatherRestApi) IsAuthorized(next http.Handler) http.Handler { return } - authorizationHeader := r.Header["Authorization"] - if authorizationHeader == nil { - http.Error(w, "no bearer token", http.StatusUnauthorized) - return - } - - jwtFromHeader := bearerTokenRegex.FindStringSubmatch(authorizationHeader[0])[1] - - var claims customClaims - token, err := jwt.ParseWithClaims( - jwtFromHeader, - &claims, - func(token *jwt.Token) (interface{}, error) { - return []byte(api.config.JwtTokenSecret), nil - }, - ) - + req, err := http.NewRequest(http.MethodGet, api.config.ValidateTokenUrl, &bytes.Buffer{}) if err != nil { - http.Error(w, err.Error(), http.StatusUnauthorized) + http.Error(w, err.Error(), http.StatusBadRequest) return } - if token.Valid { + req.Header = r.Header.Clone() + client := &http.Client{} + resp, err := client.Do(req) + if err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + if resp.StatusCode == http.StatusOK { next.ServeHTTP(w, r) return } + + http.Error(w, "", http.StatusUnauthorized) }) } diff --git a/config/config.go b/config/config.go index 2eec73c..06f7dd5 100644 --- a/config/config.go +++ b/config/config.go @@ -33,8 +33,7 @@ type MqttConfig struct { type RestConfig struct { AccessControlAllowOriginHeader string UseTokenAuthorization bool - AllowTokenGeneration bool - JwtTokenSecret string + ValidateTokenUrl string } var MongoConfiguration = MongoConfig{ @@ -64,8 +63,7 @@ var MqttConfiguration = MqttConfig{ var RestConfiguration = RestConfig{ AccessControlAllowOriginHeader: getEnv("ACCESS_CONTROL_ALLOW_ORIGIN_HEADER", "*"), UseTokenAuthorization: getEnvBool("USE_TOKEN_AUTHORIZATION", false), - AllowTokenGeneration: getEnvBool("ALLOW_TOKEN_GENERATION", false), - JwtTokenSecret: getEnv("JWT_TOKEN_SECRET", "my_token_string"), + ValidateTokenUrl: getEnv("JWT_TOKEN_VALIDATION_URL", "https://api.swablab.de/ldap/validateToken"), } var AllowUnregisteredSensors = getEnvBool("ALLOW_UNREGISTERED_SENSORS", false) diff --git a/go.mod b/go.mod index e4e15c0..523284b 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module weather-data go 1.16 require ( - github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect github.com/eclipse/paho.mqtt.golang v1.3.2 github.com/google/uuid v1.2.0 github.com/gorilla/handlers v1.5.1 // indirect diff --git a/go.sum b/go.sum index 42972fa..6c9739b 100644 --- a/go.sum +++ b/go.sum @@ -7,7 +7,6 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deepmap/oapi-codegen v1.3.13 h1:9HKGCsdJqE4dnrQ8VerFS0/1ZOJPmAhN+g8xgp8y3K4= github.com/deepmap/oapi-codegen v1.3.13/go.mod h1:WAmG5dWY8/PYHt4vKxlt90NsbHMAOCiteYKZMiIRfOo= -github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/eclipse/paho.mqtt.golang v1.3.2 h1:ICzfxSyrR8bOsh9l8JBBOwO1tc2C26oEyody0ml0L6E= github.com/eclipse/paho.mqtt.golang v1.3.2/go.mod h1:eTzb4gxwwyWpqBUHGQZ4ABAV7+Jgm1PklsYT/eo8Hcc= @@ -46,6 +45,7 @@ github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY9 github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= +github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -62,6 +62,7 @@ github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 h1:W9WBk7 github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= @@ -106,9 +107,10 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= @@ -165,6 +167,7 @@ golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= @@ -174,4 +177,5 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/thunder-collection_weather-api.json b/thunder-collection_weather-api.json index 7c0b219..6750502 100644 --- a/thunder-collection_weather-api.json +++ b/thunder-collection_weather-api.json @@ -1 +1 @@ -{"client":"Thunder Client","collectionName":"weather-api","dateExported":"2021-08-22T11:40:08.723Z","version":"1.1","folders":[],"requests":[{"containerId":"","sortNum":10000,"headers":[{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"Thunder Client (https://www.thunderclient.io)"}],"colId":"80d02036-dc8e-4060-a268-af0777f13e3e","name":"get random","url":"http://localhost:10000/random","method":"GET","modified":"2021-08-22T11:21:04.237Z","created":"2021-08-22T11:20:52.793Z","_id":"74fc43fc-ee02-4e9c-a06a-5145c146abb1","params":[],"tests":[]},{"containerId":"","sortNum":20000,"headers":[{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"Thunder Client (https://www.thunderclient.io)"}],"colId":"80d02036-dc8e-4060-a268-af0777f13e3e","name":"get random list","url":"http://localhost:10000/randomlist","method":"GET","modified":"2021-08-22T11:21:59.887Z","created":"2021-08-22T11:21:21.579Z","_id":"639d2039-ed3c-4cc9-981f-8f05d1585cc6","params":[],"tests":[]},{"containerId":"","sortNum":30000,"headers":[{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"Thunder Client (https://www.thunderclient.io)"}],"colId":"80d02036-dc8e-4060-a268-af0777f13e3e","name":"get weather data","url":"http://localhost:10000/sensor/1bc590ad-f227-4f0f-b6d1-8edfd666a103/weather-data","method":"GET","modified":"2021-08-22T11:25:17.482Z","created":"2021-08-22T11:23:06.347Z","_id":"ea9ff9bc-9fe2-42f9-99a5-8641c99767ec","params":[],"tests":[]},{"containerId":"","sortNum":40000,"headers":[{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"Thunder Client (https://www.thunderclient.io)"}],"colId":"80d02036-dc8e-4060-a268-af0777f13e3e","name":"add weather data ","url":"http://localhost:10000/sensor/00000000-f227-4f0f-b6d1-8edfd666a103/weather-data","method":"POST","modified":"2021-08-22T11:38:44.415Z","created":"2021-08-22T11:26:57.762Z","_id":"b0e7d00b-fb8d-4345-ba40-934009fbf2a4","params":[],"body":{"type":"json","raw":"{\n \"humidity\": 56.71,\n \"pressure\": 949.29,\n \"temperature\": 25.52,\n \"timeStamp\": \"2021-08-22T10:08:26Z\"\n }","form":[]},"tests":[]},{"containerId":"","sortNum":50000,"headers":[{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"Thunder Client (https://www.thunderclient.io)"}],"colId":"80d02036-dc8e-4060-a268-af0777f13e3e","name":"get sensors","url":"http://localhost:10000/sensor","method":"GET","modified":"2021-08-22T11:28:55.791Z","created":"2021-08-22T11:28:45.195Z","_id":"cb02be13-219e-4549-819e-27e6d3261dad","params":[],"tests":[]},{"containerId":"","sortNum":65000,"headers":[{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"Thunder Client (https://www.thunderclient.io)"}],"colId":"80d02036-dc8e-4060-a268-af0777f13e3e","name":"add sensor","url":"http://localhost:10000/register/sensor/NeuerSensor","method":"POST","modified":"2021-08-22T11:33:01.470Z","created":"2021-08-22T11:31:04.995Z","_id":"314518b7-0903-4f35-aaa7-52cd7ce607de","params":[],"tests":[]},{"containerId":"","sortNum":67500,"headers":[{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"Thunder Client (https://www.thunderclient.io)"}],"colId":"80d02036-dc8e-4060-a268-af0777f13e3e","name":"get sensor","url":"http://localhost:10000/sensor/a1e01429-6194-479b-b26b-6c5faa971366","method":"GET","modified":"2021-08-22T11:33:04.551Z","created":"2021-08-22T11:29:36.147Z","_id":"92c576b4-0306-4bd5-b4b2-437682a06e2c","params":[],"tests":[]},{"containerId":"","sortNum":70000,"headers":[{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"Thunder Client (https://www.thunderclient.io)"}],"colId":"80d02036-dc8e-4060-a268-af0777f13e3e","name":"update sensor","url":"http://localhost:10000/sensor/a1e01429-6194-479b-b26b-6c5faa971366","method":"PUT","modified":"2021-08-22T11:33:49.254Z","created":"2021-08-22T11:30:43.763Z","_id":"5e57fbc8-0810-4a06-894a-52371635b1a5","params":[],"body":{"type":"json","raw":"{\n \"Name\": \"NeuerSensor von mir\",\n \"Location\": \"\",\n \"Longitude\": 0,\n \"Latitude\": 0\n}","form":[]},"tests":[]},{"containerId":"","sortNum":80000,"headers":[{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"Thunder Client (https://www.thunderclient.io)"}],"colId":"80d02036-dc8e-4060-a268-af0777f13e3e","name":"delete sensor","url":"http://localhost:10000/sensor/a1e01429-6194-479b-b26b-6c5faa971366","method":"DELETE","modified":"2021-08-22T11:33:15.031Z","created":"2021-08-22T11:30:54.435Z","_id":"2a9fc092-e57e-48b0-83e3-c3e6a0cf1628","params":[],"tests":[]}]} +{"client":"Thunder Client","collectionName":"weather-api","dateExported":"2021-08-22T12:30:23.045Z","version":"1.1","folders":[],"requests":[{"containerId":"","sortNum":10000,"headers":[{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"Thunder Client (https://www.thunderclient.io)"}],"colId":"80d02036-dc8e-4060-a268-af0777f13e3e","name":"get random","url":"http://localhost:10000/random","method":"GET","modified":"2021-08-22T11:21:04.237Z","created":"2021-08-22T11:20:52.793Z","_id":"74fc43fc-ee02-4e9c-a06a-5145c146abb1","params":[],"tests":[]},{"containerId":"","sortNum":20000,"headers":[{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"Thunder Client (https://www.thunderclient.io)"}],"colId":"80d02036-dc8e-4060-a268-af0777f13e3e","name":"login/get token (swablab-api)","url":"https://api.swablab.de/ldap/login","method":"GET","modified":"2021-08-22T12:30:11.677Z","created":"2021-08-22T11:44:53.612Z","_id":"23e09b93-77df-410e-b2ae-f364ab07b724","params":[],"tests":[]},{"containerId":"","sortNum":20000,"headers":[{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"Thunder Client (https://www.thunderclient.io)"}],"colId":"80d02036-dc8e-4060-a268-af0777f13e3e","name":"get random list","url":"http://localhost:10000/randomlist","method":"GET","modified":"2021-08-22T11:21:59.887Z","created":"2021-08-22T11:21:21.579Z","_id":"639d2039-ed3c-4cc9-981f-8f05d1585cc6","params":[],"tests":[]},{"containerId":"","sortNum":30000,"headers":[{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"Thunder Client (https://www.thunderclient.io)"}],"colId":"80d02036-dc8e-4060-a268-af0777f13e3e","name":"get weather data","url":"http://localhost:10000/sensor/1bc590ad-f227-4f0f-b6d1-8edfd666a103/weather-data","method":"GET","modified":"2021-08-22T11:25:17.482Z","created":"2021-08-22T11:23:06.347Z","_id":"ea9ff9bc-9fe2-42f9-99a5-8641c99767ec","params":[],"tests":[]},{"containerId":"","sortNum":40000,"headers":[{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"Thunder Client (https://www.thunderclient.io)"}],"colId":"80d02036-dc8e-4060-a268-af0777f13e3e","name":"add weather data ","url":"http://localhost:10000/sensor/00000000-f227-4f0f-b6d1-8edfd666a103/weather-data","method":"POST","modified":"2021-08-22T11:38:44.415Z","created":"2021-08-22T11:26:57.762Z","_id":"b0e7d00b-fb8d-4345-ba40-934009fbf2a4","params":[],"body":{"type":"json","raw":"{\n \"humidity\": 56.71,\n \"pressure\": 949.29,\n \"temperature\": 25.52,\n \"timeStamp\": \"2021-08-22T10:08:26Z\"\n }","form":[]},"tests":[]},{"containerId":"","sortNum":50000,"headers":[{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"Thunder Client (https://www.thunderclient.io)"}],"colId":"80d02036-dc8e-4060-a268-af0777f13e3e","name":"get sensors","url":"http://localhost:10000/sensor","method":"GET","modified":"2021-08-22T12:26:48.894Z","created":"2021-08-22T11:28:45.195Z","_id":"cb02be13-219e-4549-819e-27e6d3261dad","params":[],"auth":{"type":"bearer","bearer":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJnaXZlbl9uYW1lIjoiSm9lbCIsImZhbWlseV9uYW1lIjoiU2NobWlkIiwiZW1haWwiOiJqb2Vsc2NobWlkd2l0dEBnbWFpbC5jb20iLCJ1aWQiOiIyMDAxIiwidXNlcm5hbWUiOiJqb2VscyIsInJvbGUiOlsiZXZlcnlib2R5IiwiYWRtaW5zIiwiaW5mcmEiLCJmaW5hbmNlIiwibWFuYWdlbWVudCJdLCJuYmYiOjE2Mjk2MzUxODYsImV4cCI6MTYyOTYzNjk4NiwiaWF0IjoxNjI5NjM1MTg2LCJpc3MiOiJodHRwczovL3N3YWJsYWIuZGUiLCJhdWQiOiJodHRwczovL3N3YWJsYWIuZGUifQ.sHB3GAxzhjkcRnsndaaH9Yr1oSQUScmdjcmgFgbcrB8"},"tests":[]},{"containerId":"","sortNum":65000,"headers":[{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"Thunder Client (https://www.thunderclient.io)"}],"colId":"80d02036-dc8e-4060-a268-af0777f13e3e","name":"add sensor","url":"http://localhost:10000/register/sensor/NeuerSensor","method":"POST","modified":"2021-08-22T11:33:01.470Z","created":"2021-08-22T11:31:04.995Z","_id":"314518b7-0903-4f35-aaa7-52cd7ce607de","params":[],"tests":[]},{"containerId":"","sortNum":67500,"headers":[{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"Thunder Client (https://www.thunderclient.io)"}],"colId":"80d02036-dc8e-4060-a268-af0777f13e3e","name":"get sensor","url":"http://localhost:10000/sensor/a1e01429-6194-479b-b26b-6c5faa971366","method":"GET","modified":"2021-08-22T11:33:04.551Z","created":"2021-08-22T11:29:36.147Z","_id":"92c576b4-0306-4bd5-b4b2-437682a06e2c","params":[],"tests":[]},{"containerId":"","sortNum":70000,"headers":[{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"Thunder Client (https://www.thunderclient.io)"}],"colId":"80d02036-dc8e-4060-a268-af0777f13e3e","name":"update sensor","url":"http://localhost:10000/sensor/a1e01429-6194-479b-b26b-6c5faa971366","method":"PUT","modified":"2021-08-22T11:33:49.254Z","created":"2021-08-22T11:30:43.763Z","_id":"5e57fbc8-0810-4a06-894a-52371635b1a5","params":[],"body":{"type":"json","raw":"{\n \"Name\": \"NeuerSensor von mir\",\n \"Location\": \"\",\n \"Longitude\": 0,\n \"Latitude\": 0\n}","form":[]},"tests":[]},{"containerId":"","sortNum":80000,"headers":[{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"Thunder Client (https://www.thunderclient.io)"}],"colId":"80d02036-dc8e-4060-a268-af0777f13e3e","name":"delete sensor","url":"http://localhost:10000/sensor/a1e01429-6194-479b-b26b-6c5faa971366","method":"DELETE","modified":"2021-08-22T11:33:15.031Z","created":"2021-08-22T11:30:54.435Z","_id":"2a9fc092-e57e-48b0-83e3-c3e6a0cf1628","params":[],"tests":[]}]}