Commit 25593879 authored by jan.koester's avatar jan.koester
Browse files

fixed

parent 3d5326dc
Loading
Loading
Loading
Loading
Loading
+8 −3
Changes for api/curl.sh: 8 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -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[^"]*' )
}

@@ -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' ]
@@ -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
+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"
            }
        }
+0 −1
Changes for src/api.cpp: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -300,7 +300,6 @@ namespace authdb {
                            }
                        }
                        if(!clientname.empty() && !clientsecret.empty()){
                                std::cout<< "test" << std::endl;
                                uuid gpid;
                                gpid.generate();

+1 −1
Changes for src/uuid.cpp: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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;
}