Skip to content

Agent Mesh

remove unused function argument

Antonio Ojeac8167c579ed4
diff --git a/cmd/sam-hub/main.go b/cmd/sam-hub/main.go
index 74aff294..059aa4fc 100644
--- a/cmd/sam-hub/main.go
+++ b/cmd/sam-hub/main.go
@@ -252,7 +252,7 @@ func (h *Hub) handleEnroll(s network.Stream) {
ctx, cancel := context.WithTimeout(context.Background(), JWTVerificationTimeout)
defer cancel()
- claims, token, err := h.parseAndVerifyJWT(ctx, req.Jwt, remotePeer)
+ claims, token, err := h.parseAndVerifyJWT(ctx, req.Jwt)
if err != nil {
logger.Errorw("JWT verification failed", "peer_id", remotePeer, "error", err)
samHubEnrollmentTotal.WithLabelValues("failed").Inc()
@@ -341,7 +341,7 @@ func (h *Hub) sendEnrollResponse(s network.Stream, biscuitToken []byte, errMsg s
}
}
-func (h *Hub) parseAndVerifyJWT(ctx context.Context, jwtStr string, remotePeer peer.ID) (jwt.MapClaims, *oidc.IDToken, error) {
+func (h *Hub) parseAndVerifyJWT(ctx context.Context, jwtStr string) (jwt.MapClaims, *oidc.IDToken, error) {
jwtParser := jwt.Parser{}
jwtToken, _, err := jwtParser.ParseUnverified(jwtStr, jwt.MapClaims{})
if err != nil {