hunk.code_window:   -- verify the JWT
     claims <- liftJWTError invalidJWTError $ verifyJwt (jcKey conf) jwt
     -- filter only x-hasura claims
  
hunk.labels: keep keep keep add keep
hunk.after_edit:   let claimsNs = fromMaybe defaultClaimNs $ jcClaimNs conf
     -- see if the hasura claims key exist in the claims map
     let mHasuraClaims = Map.lookup claimsNs $ claims ^. unregisteredClaims
     hasuraClaimsV <- maybe claimsNotFound return mHasuraClaims
     -- the value of hasura claims key has to be an object
     hasuraClaims <- validateIsObject hasuraClaimsV
  
hunk.file_path: server/src-lib/Hasura/Server/Auth/JWT.hs
hunk.type: add
file: package commands
  
  import (
  	"net/url"
  	"os"
  	"testing"
  	"time"
  
  	"github.com/briandowns/spinner"
  	"github.com/hasura/graphql-engine/cli"
  	"github.com/sirupsen/logrus/hooks/test"
  )
  
  func testMetadataApply(t *testing.T, metadataFile string, endpoint *url.URL) {
  	logger, _ := test.NewNullLogger()
  	opts := &metadataApplyOptions{
  		EC: &cli.ExecutionContext{
  			Logger:       logger,
  			Spinner:      spinner.New(spinner.CharSets[7], 100*time.Millisecond),
  			MetadataFile: metadataFile,
  			Config: &cli.HasuraGraphQLConfig{
  				Endpoint:       endpoint.String(),
  				AccessKey:      os.Getenv("HASURA_GRAPHQL_TEST_ACCESS_KEY"),
  				ParsedEndpoint: endpoint,
  			},
  		},
  		actionType: "apply",
  	}
  
  	err := opts.run()
  	if err != nil {
  		t.Fatalf("failed exporting metadata: %v", err)
  	}
  }
  