[C++][Qt5] added Authentication Support (#8004)

* first commit of api Key feature.

* added multi key and URL query key support

* fixed error in mustache files, updated samples and tests

* added Basic Auth with Base64 encoding.

* updated Readme, added bearer token

* added check that authentication credentials are set. fixed typo in README
This commit is contained in:
basyskom-dege
2020-11-28 08:02:09 +01:00
committed by GitHub
parent 045d05fa72
commit cb1a620628
13 changed files with 517 additions and 1 deletions

View File

@@ -37,6 +37,7 @@ void PetApiTests::findPetsByStatusTest() {
void PetApiTests::createAndGetPetTest() {
PFXPetApi api;
api.setApiKey("api_key","special-key");
QEventLoop loop;
bool petCreated = false;

View File

@@ -6,6 +6,8 @@
void StoreApiTests::placeOrderTest() {
PFXStoreApi api;
// api.setUsername("TestName");
// api.setPassword("TestPassword");
QEventLoop loop;
bool orderPlaced = false;
@@ -36,6 +38,7 @@ void StoreApiTests::placeOrderTest() {
void StoreApiTests::getOrderByIdTest() {
PFXStoreApi api;
api.setApiKey("api_key_2","testKey");
QEventLoop loop;
bool orderFetched = false;
@@ -59,6 +62,7 @@ void StoreApiTests::getOrderByIdTest() {
void StoreApiTests::getInventoryTest() {
PFXStoreApi api;
api.setApiKey("api_key","special-key");
QEventLoop loop;
bool inventoryFetched = false;