These are chat archives for quorrajs/quorrajs

30th
Aug 2016
Harish
@harishanchu
Aug 30 2016 05:15
@ergusto Yes there is. You can define a catch all route method with the help Route.any and Route.where method like below:
Route.any('{all}', function(req, res, uri) {

    res.view('index', { title: 'Quorra' });

}).where('all', '.*');
Fergus Ruston
@ergusto
Aug 30 2016 10:42
That's great thanks @harishanchu. I had ended up using the app.before event to do the same thing based on the request url but this is cleaner.
Harish
@harishanchu
Aug 30 2016 11:04
👍
Fergus Ruston
@ergusto
Aug 30 2016 15:38
How should I go about authenticating for api calls? Is there a way to generate a token to send to the client or should I use something like JWT? Thanks in advance!
Harish
@harishanchu
Aug 30 2016 15:56
@ergusto Quorra provides basic authentication support including HTTP Basic authentication: https://quorrajs.org/docs/v1/more/security.html
If you wanna use JWT you may have to use some npm jwt module. You can integrate it with existing auth implementation or use independently.
Have a look at the default auth service source code if you are planning to extend it with some JWT module for your application: https://github.com/quorrajs/Positron/blob/master/lib/auth/Guard.js
Fergus Ruston
@ergusto
Aug 30 2016 16:28
Awesome thanks for the tips I'll probably use JWT.