private void handle401 ( final YokeRequest request , final Handler < Object > next ) { YokeResponse response = request . response ( ) ; response . putHeader ( "WWW-Authenticate" , "Basic realm=\"" + getRealm ( request ) + "\"" ) ; response . setStatusCode ( 401 ) ; next . handle ( "No authorization token" ) ; }
Handle all forbidden errors in this case we need to add a special header to the response