Skip to content

Commit 39b774d

Browse files
committed
removed token issues
Signed-off-by: Saranya-jena <saranya.jena@harness.io>
1 parent b72fb54 commit 39b774d

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

chaoscenter/graphql/server/graph/resolver.go

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package graph
22

33
import (
44
"context"
5+
"fmt"
56
"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb/authConfig"
67

78
chaos_experiment2 "github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/chaos_experiment/ops"
@@ -93,6 +94,8 @@ func NewConfig(mongodbOperator mongodb.MongoOperator) generated.Config {
9394
if err != nil {
9495
return nil, err
9596
}
97+
98+
fmt.Println("here2")
9699
newCtx := context.WithValue(ctx, authorization.UserClaim, user)
97100
newCtx = context.WithValue(newCtx, "username", user["username"])
98101

chaoscenter/graphql/server/pkg/authorization/middleware.go

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package authorization
22

33
import (
44
"context"
5+
"fmt"
56
"net/http"
67
"strings"
78

@@ -38,6 +39,7 @@ func Middleware(handler http.Handler, mongoClient *mongo.Client) gin.HandlerFunc
3839
ctx := context.WithValue(c.Request.Context(), AuthKey, jwt)
3940
ctx1 := context.WithValue(ctx, "request-header", c.Request.Header)
4041
c.Request = c.Request.WithContext(ctx1)
42+
fmt.Println("here1")
4143
handler.ServeHTTP(c.Writer, c.Request)
4244
}
4345
}

0 commit comments

Comments
 (0)