nl_tokens: / * Registers basic authorization
pl_tokens: function registerBasicAuth ( app , authConfig ) { if ( typeof authConfig . user !== 'string' || typeof authConfig . password !== 'string' ) return ; app . use ( ( req , res , next ) => { let credentials = basicAuth ( req ) ; if ( ! credentials || credentials . <mask> !== authConfig . user || credentials . pass !== authConfig . password ) { res . setHeader ( 'WWW-Authenticate' , ` ${ config . realm || 'app' } ` ) ; return next ( thorin . error ( 'UNAUTHORIZED' , 'Authorization failed' , 401 ) ) ; } next ( ) ; } ) ; }