Loading api/curl.sh +8 −3 Changes for api/curl.sh: 8 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -4,9 +4,7 @@ cllogin () { clientlogin=$(sed -e 's/$clientname/'$(echo $clientname)'/g' -e 's/$clientkey/'$(echo $clientsecret)'/g' clientlogin.json) echo $clientlogin ret=$(curl -d "$(echo $clientlogin)" "http://$host:$port/api/$domainid" -s --output - ) echo $ret conid=$(echo $ret | grep -oP '"connectionid"\s*:\s*"\K[^"]*' ) } Loading @@ -14,7 +12,6 @@ userlogin () { userlogin=$(sed -e 's/$username/'$(echo $username)'/g' -e 's/$userpassword/'$(echo $userpassword)'/g' -e 's/$clientsession/'$(echo $conid)'/g' userlogin.json) ret=$(curl -d "$(echo $userlogin)" "http://$host:$port/api/$domainid" -s --output - ) sessionid=$(echo $ret | grep -oP '"sessionid"\s*:\s*"\K[^"]*' ) echo $ret } if [ $2 = 'checkgpo' ] Loading @@ -33,3 +30,11 @@ then ret=$(curl -d "$(echo $addconnection)" "http://$host:$port/api/$domainid" -s --output - ) echo $ret fi if [ $2 = 'remconnection' ] then userlogin remconnection=$(sed -e 's/$sessionid/'$(echo $sessionid)'/g' -e 's/$clientid/'$(echo $3)'/g' remcon.json) ret=$(curl -d "$(echo $remconnection)" "http://$host:$port/api/$domainid" -s --output - ) echo $ret fi api/remcon.json +2 −2 Changes for api/remcon.json: 2 added lines, 2 removed lines. Original line number Diff line number Diff line { "commands" : [ { "usersession" : "$usersession", "removeconnection" : { "usersession" : "$sessionid", "remconnection" : { "clientid" : "$clientid" } } Loading src/api.cpp +0 −1 Changes for src/api.cpp: 0 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -300,7 +300,6 @@ namespace authdb { } } if(!clientname.empty() && !clientsecret.empty()){ std::cout<< "test" << std::endl; uuid gpid; gpid.generate(); Loading src/uuid.cpp +1 −1 Changes for src/uuid.cpp: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ int authdb::uuid::parse(const char* src){ bool authdb::uuid::empty() const{ if(uuid_is_null(value)==0) if(uuid_is_null(value)==1) return true; return false; } Loading Loading
api/curl.sh +8 −3 Changes for api/curl.sh: 8 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -4,9 +4,7 @@ cllogin () { clientlogin=$(sed -e 's/$clientname/'$(echo $clientname)'/g' -e 's/$clientkey/'$(echo $clientsecret)'/g' clientlogin.json) echo $clientlogin ret=$(curl -d "$(echo $clientlogin)" "http://$host:$port/api/$domainid" -s --output - ) echo $ret conid=$(echo $ret | grep -oP '"connectionid"\s*:\s*"\K[^"]*' ) } Loading @@ -14,7 +12,6 @@ userlogin () { userlogin=$(sed -e 's/$username/'$(echo $username)'/g' -e 's/$userpassword/'$(echo $userpassword)'/g' -e 's/$clientsession/'$(echo $conid)'/g' userlogin.json) ret=$(curl -d "$(echo $userlogin)" "http://$host:$port/api/$domainid" -s --output - ) sessionid=$(echo $ret | grep -oP '"sessionid"\s*:\s*"\K[^"]*' ) echo $ret } if [ $2 = 'checkgpo' ] Loading @@ -33,3 +30,11 @@ then ret=$(curl -d "$(echo $addconnection)" "http://$host:$port/api/$domainid" -s --output - ) echo $ret fi if [ $2 = 'remconnection' ] then userlogin remconnection=$(sed -e 's/$sessionid/'$(echo $sessionid)'/g' -e 's/$clientid/'$(echo $3)'/g' remcon.json) ret=$(curl -d "$(echo $remconnection)" "http://$host:$port/api/$domainid" -s --output - ) echo $ret fi
api/remcon.json +2 −2 Changes for api/remcon.json: 2 added lines, 2 removed lines. Original line number Diff line number Diff line { "commands" : [ { "usersession" : "$usersession", "removeconnection" : { "usersession" : "$sessionid", "remconnection" : { "clientid" : "$clientid" } } Loading
src/api.cpp +0 −1 Changes for src/api.cpp: 0 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -300,7 +300,6 @@ namespace authdb { } } if(!clientname.empty() && !clientsecret.empty()){ std::cout<< "test" << std::endl; uuid gpid; gpid.generate(); Loading
src/uuid.cpp +1 −1 Changes for src/uuid.cpp: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ int authdb::uuid::parse(const char* src){ bool authdb::uuid::empty() const{ if(uuid_is_null(value)==0) if(uuid_is_null(value)==1) return true; return false; } Loading