Skip to content
Corex

ChallengeVerification

Corex\Security\ChallengeVerification · class · Core layer

The typed verdict of an anti-automation challenge. A boolean cannot say why a submission failed, which is why a score threshold and an action label could be stored but never enforced — there was nowhere to carry the score. This value object is that place. It is deliberately secret-free: it never holds the raw token or the raw provider payload, so it is safe to persist as submission evidence and to surface (redacted) to an administrator.

pass(float $score, float $effectiveThreshold, string $expectedAction, ?string $hostname): self

Section titled “pass(float $score, float $effectiveThreshold, string $expectedAction, ?string $hostname): self”

fail(string $outcome, string $expectedAction, float $effectiveThreshold, string $safeReason, ?float $score, ?string $hostname): self

Section titled “fail(string $outcome, string $expectedAction, float $effectiveThreshold, string $safeReason, ?float $score, ?string $hostname): self”

The secret-free wire projection. This is the only representation that leaves the object; it exposes no token and no raw provider response by construction.