Skip to content

Commit

Permalink
Log assessment response (#383)
Browse files Browse the repository at this point in the history
  • Loading branch information
rajivnathan authored Jan 4, 2024
1 parent 3bfa356 commit ed9f175
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/verification/captcha/captcha.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,12 @@ func (c Helper) CompleteAssessment(ctx *gin.Context, cfg configuration.Registrat
// Get the risk score and the reason(s).
// For more information on interpreting the assessment,
// see: https://cloud.google.com/recaptcha-enterprise/docs/interpret-assessment
log.Info(ctx, fmt.Sprintf("The reCAPTCHA assessment score is: %.1f", response.RiskAnalysis.Score))
log.Info(ctx, fmt.Sprintf("reCAPTCHA assessment score: %.1f", response.RiskAnalysis.Score))

for _, reason := range response.RiskAnalysis.Reasons {
log.Info(ctx, fmt.Sprintf("Risk analysis reason: %s", reason.String()))
}
log.Info(ctx, fmt.Sprintf("Assessment Response: %+v", response))
return response.RiskAnalysis.Score, nil
}

Expand Down

0 comments on commit ed9f175

Please sign in to comment.