mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-08 04:06:12 +00:00
[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:
@@ -37,6 +37,7 @@ void PetApiTests::findPetsByStatusTest() {
|
||||
|
||||
void PetApiTests::createAndGetPetTest() {
|
||||
PFXPetApi api;
|
||||
api.setApiKey("api_key","special-key");
|
||||
QEventLoop loop;
|
||||
bool petCreated = false;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user