A type-guard function that determines if a given express request object is an AuthdReq object.
If you pass in an obstructions array, it will be filled with any reasons why the request is not an AuthdReq.
NOTE: This is generally a bad pattern. It's better to use the assertAuthdReq function below, which is a
type-assertion function and will throw a useful HttpError if the request is not an AuthdReq.
A type-guard function that determines if a given express request object is an AuthdReq object.
If you pass in an obstructions array, it will be filled with any reasons why the request is not an AuthdReq.
NOTE: This is generally a bad pattern. It's better to use the
assertAuthdReq
function below, which is a type-assertion function and will throw a useful HttpError if the request is not an AuthdReq.