[PHP] Change from CURLAUTH_BASIC to CURLAUTH_DIGEST

153 views
Skip to first unread message

Julius

unread,
Jul 8, 2016, 11:22:31 AM7/8/16
to Swagger
Hello,
because of an API I have to use I have to change from CURLAUTH_BASIC to CURLAUTH_DIGEST. What is the best way to archive that?
I already changed some things in ApiClient.php:
• I dont removed this stuff: $headerParams['Authorization'] = 'Basic ' ....
• and i changed to CURLAUTH_DIGEST: 
        url_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
        curl_setopt($curl, CURLOPT_USERPWD, 'name:apikey');

Is this a good idea or do you have any better suggestions? 

I want to use the Swagger Editor to generate several Clients but I can't use the Server Generator.

Thank's for the help!

-Julius 
Reply all
Reply to author
Forward
0 new messages