barclayadam / blueprint

Blueprint is a framework for building high-performance HTTP apis, console apps & background processors
Apache License 2.0
7 stars 2 forks source link

Stop using exceptions for auth failures #10

Open barclayadam opened 4 years ago

barclayadam commented 4 years ago

The Authentication and Authorisation middlewares should directly return a new ForbiddenResult or UnauthorisedResult instead of throwing an exception and then having that interrogated and converted back to a forbidden/unauthorised HTTP result