This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var set = require('can-set'); | |
// The current API | |
var algebra = new set.Algebra( | |
// specify the unique identifier on data | |
set.props.id("_id"), | |
// specify that completed can be true, false or undefined | |
set.props.boolean("retired"), | |
// specify properties that define pagination | |
set.props.rangeInclusive("start","end"), |
We have introduced 3 new hooks and 2 new middleware as part of feathers-permissions that give you much more flexibility and control over access permissions than was previously possible. Permissions are stored in the database on the entity record that needs to have access permissions checked (typically a user). They look like this:
[
'*', // all services, all methods, all docs
'users:*', // all methods on users service
'users:remove:*', // can remove any user
'*:remove', // can remove on any service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "npm run dev", | |
"runtimeExecutable": "npm", | |
"windows": { | |
"runtimeExecutable": "npm.cmd" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const authentication = require('feathers-authentication'); | |
const jwt = require('feathers-authentication-jwt'); | |
const local = require('feathers-authentication-local'); | |
const oauth2 = require('feathers-authentication-oauth2'); | |
const GithubStrategy = require('passport-github'); | |
// Bring in the oauth-handler | |
const makeHandler = require('./oauth-handler'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"accept": "application/json, text/javascript, */*; q=0.01", | |
"accept-encoding": "gzip, deflate, br", | |
"accept-language": "en-US,en;q=0.8,cy;q=0.6", | |
"authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6ImFjY2VzcyJ9.eyJ1c2VySWQiOiI0akZ4SEtQWXRpcnVwMkROIiwiaWF0IjoxNDkxNTM3ODExLCJleHAiOjE0OTE2MjQyMTEsImF1ZCI6Imh0dHBzOi8veW91cmRvbWFpbi5jb20iLCJpc3MiOiJmZWF0aGVycyIsInN1YiI6ImFub255bW91cyJ9.zOqO6bUgQrsMy7JIea6eoDCrMUqnIj2qKE8CPFOvhsQ", | |
"cache-control": "no-cache", | |
"connection": "keep-alive", | |
"content-length": "31", | |
"content-type": "application/json", | |
"host": "localhost:3030", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const { authenticate } = require('feathers-authentication').hooks; | |
const { hashPassword } = require('feathers-authentication-local').hooks; | |
// Bring in the `iff` hook. | |
const { iff } = require('feathers-hooks-common'); | |
module.exports = { | |
before: { | |
find: [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const authentication = require('feathers-authentication'); | |
const jwt = require('feathers-authentication-jwt'); | |
const local = require('feathers-authentication-local'); | |
module.exports = function() { | |
const app = this; | |
const config = app.get('authentication'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"host": "localhost", | |
"port": 3030, | |
"public": "../public/", | |
"paginate": { | |
"default": 10, | |
"max": 50 | |
}, | |
"authentication": { | |
"secret": "jcOPTCaY9ikyp5emSA4ChcF3Q3Pytwmadr6G954JDO8XURb5LW1btEOZ2CVgeCOe", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/app.js | |
/** | |
* There's not much to do here. Just remove or comment out | |
* the lines that use feathers.static (the public/ directory) | |
*/ | |
app.use('/', feathers.static(app.get('public'))); // Find and remove this line |