nl_tokens: The middleware to check if the request contains at least one roles enabled to fullfill the requesting resource
pl_tokens: function check_role_authorization ( req , res , next ) { if ( ! req . hasOwnProperty ( "user" ) || ! req . user . hasOwnProperty ( 'authorized_roles' ) || ! ( req . user . authorized_roles instanceof Array ) || req . user . authorized_roles . length === 0 ) { running_debug ( "Unhautorized: Invalid role or path not configured" ) ; var err = <mask> Error ( "Unhautorized: Invalid role or path not configured" ) ; err . status = 401 ; return next ( err ) ; } running_debug ( "Authorized roles: " + req . user . authorized_roles ) ; return next ( ) ; }