Built motion from commit acdb237.|0.0.44
[motion.git] / server / auth / local / index.js
1 var _0x67f8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x70\x61\x73\x73\x70\x6F\x72\x74","\x61\x73\x79\x6E\x63","\x2E\x2E\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x6C\x6F\x63\x61\x6C\x2D\x6C\x6F\x67\x69\x6E","\x6A\x73\x6F\x6E","\x73\x74\x61\x74\x75\x73","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x77\x65\x6E\x74\x20\x77\x72\x6F\x6E\x67\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x74\x72\x79\x20\x61\x67\x61\x69\x6E\x2E","\x69\x64","\x72\x6F\x6C\x65","\x72\x65\x6D\x65\x6D\x62\x65\x72","\x62\x6F\x64\x79","\x73\x69\x67\x6E\x54\x6F\x6B\x65\x6E","\x63\x61\x74\x63\x68","\x6E\x61\x6D\x65","\x6C\x6F\x67\x69\x6E","\x2E\x2F\x6C\x6F\x63\x61\x6C\x2E\x61\x6D\x69","\x65\x61\x63\x68\x53\x65\x72\x69\x65\x73","\x74\x68\x65\x6E","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x6C\x6F\x67\x6F\x75\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x75\x73\x65\x72","\x6C\x6F\x67\x6F\x75\x74","\x72\x65\x64\x69\x72\x65\x63\x74","\x67\x65\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x67f8[0];var express=require(_0x67f8[1]);var passport=require(_0x67f8[2]);var async=require(_0x67f8[3]);var auth=require(_0x67f8[4]);var User=require(_0x67f8[6])[_0x67f8[5]];var license=require(_0x67f8[7]);var router=express.Router();router[_0x67f8[27]](_0x67f8[8],function(_0x9611x8,_0x9611x9,_0x9611xa){passport[_0x67f8[26]](_0x67f8[9],function(_0x9611xb,_0x9611xc,_0x9611xd){var _0x9611xe=_0x9611xb||_0x9611xd;if(_0x9611xe){return _0x9611x9[_0x67f8[11]](401)[_0x67f8[10]](_0x9611xe)};if(!_0x9611xc){return _0x9611x9[_0x67f8[11]](404)[_0x67f8[10]]({message:_0x67f8[12]})};var _0x9611xf=auth[_0x67f8[17]](_0x9611xc[_0x67f8[13]],_0x9611xc[_0x67f8[14]],_0x9611x8[_0x67f8[16]][_0x67f8[15]]||false);User[_0x67f8[25]](_0x9611xc[_0x67f8[13]])[_0x67f8[23]](function(_0x9611xc){_0x9611xc[_0x67f8[24]]({attributes:[_0x67f8[19]]})[_0x67f8[23]](function(_0x9611x10){async[_0x67f8[22]](_0x9611x10,function _0x9611x11(_0x9611x12,_0x9611x13){require(_0x67f8[21])[_0x67f8[20]](_0x9611xc[_0x67f8[13]],_0x9611xc[_0x67f8[19]],_0x9611x12[_0x67f8[19]],_0x9611x13)},function _0x9611x14(){return _0x9611x9[_0x67f8[10]]({token:_0x9611xf,userId:_0x9611xc[_0x67f8[13]]})})})[_0x67f8[18]](function(_0x9611xb){return _0x9611xa(_0x9611xb)})})[_0x67f8[18]](function(_0x9611xb){return _0x9611xa(_0x9611xb)})})(_0x9611x8,_0x9611x9,_0x9611xa)});router[_0x67f8[33]](_0x67f8[28],auth[_0x67f8[29]](),function(_0x9611x8,_0x9611x9,_0x9611xa){User[_0x67f8[25]](_0x9611x8[_0x67f8[30]][_0x67f8[13]])[_0x67f8[23]](function(_0x9611xc){_0x9611xc[_0x67f8[24]]({attributes:[_0x67f8[19]]})[_0x67f8[23]](function(_0x9611x10){async[_0x67f8[22]](_0x9611x10,function _0x9611x11(_0x9611x12,_0x9611x13){require(_0x67f8[21])[_0x67f8[31]](_0x9611x8[_0x67f8[30]][_0x67f8[13]],_0x9611x8[_0x67f8[30]][_0x67f8[19]],_0x9611x12[_0x67f8[19]],_0x9611x13)},function _0x9611x14(){_0x9611x8[_0x67f8[31]]();_0x9611x9[_0x67f8[32]](_0x67f8[8])})})[_0x67f8[18]](function(_0x9611xb){return _0x9611xa(_0x9611xb)})})[_0x67f8[18]](function(_0x9611xb){return _0x9611xa(_0x9611xb)})});module[_0x67f8[34]]=router