Pass context from http request to attest lib

This commit is contained in:
Jonny Stoten
2024-06-11 11:20:42 +01:00
parent 11a0d75e80
commit 0e128d6083

View File

@@ -1,7 +1,6 @@
package handler
import (
"context"
"encoding/json"
"fmt"
"io"
@@ -74,7 +73,7 @@ func handler(w http.ResponseWriter, req *http.Request) {
}
// verify attestations
ctx := context.TODO()
ctx := req.Context()
debug := true
ctx = policy.WithPolicyEvaluator(ctx, policy.NewRegoEvaluator(debug))
policy, err := attest.Verify(ctx, opts, resolver)