Provide a means to specify base request matchers for ANY or specific methods such that all the requests with that method must match the provided criteria or be rejected.
These should NOT provide responders, but only request matchers.
Call them request requirements (?)
Something like:
server = new ErsatzServer(cfg -> {
cfg.requires(q -> {
q.ANY('*', req -> {
req.header("Auth-Token", requiredToken);
});
});
});
Which would require that any request method against any path must have the specified header, or else be rejected.
This would be useful with the recent removal of direct BASIC auth support since its done per request now, as a matcher.
Provide a means to specify base request matchers for ANY or specific methods such that all the requests with that method must match the provided criteria or be rejected.
These should NOT provide responders, but only request matchers.
Call them request requirements (?)
Something like:
Which would require that any request method against any path must have the specified header, or else be rejected.
This would be useful with the recent removal of direct BASIC auth support since its done per request now, as a matcher.