bynk.test.forged_needs_signature_route
Error A case drives by Forged at an address that is not an http route with a Signature, Bearer or Oidc actor, or by Stale at one with no Signature actor (alone, or as a member of an actor sum); they send a bad credential, so only a Signature, Bearer or Oidc seam can refuse them.
by Forged and by Stale send a bad credential to a real auth seam, so the route must have a seam that can refuse it. Forged needs a Signature, Bearer or Oidc actor. Stale needs a Signature actor, since only a signature carries a timestamp to age. On any other route there is nothing to refuse and the case would test nothing, so it is refused. Drive a route with the right seam. See bynk.test.stale_needs_timestamp for a Signature actor with no timestamp.
Example
on GET("/me") () -> Effect[HttpResult[String]] by u: User { … }on POST("/hook") (body: String) -> Effect[HttpResult[String]] by Hook { … }
// tests/api.test.bynklet r <- api.GET("/me") by Stale // ✗ a `Bearer` route has no signature to agelet r <- api.POST("/hook", "x") by Stale // ✓ `Hook` is a `Signature` actorIn the Book
See also
- The grammar rule it governs:
case. - Every code in its category, Tests, on the diagnostic index.
bynk explain bynk.test.forged_needs_signature_routeshows the same from the installed toolchain, without a network.