William Cheng 4260c7aaf0
Better tests for php-nextgen (#16569)
* better tests for php nextgen

* add new files
2023-09-13 10:50:29 +08:00

1.6 KiB

OpenAPI\Client\AuthApi

All URIs are relative to http://localhost:3000, except if the operation defines another base path.

Method HTTP request Description
testAuthHttpBasic() POST /auth/http/basic To test HTTP basic authentication

testAuthHttpBasic()

testAuthHttpBasic(): string

To test HTTP basic authentication

To test HTTP basic authentication

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: http_auth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new OpenAPI\Client\Api\AuthApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->testAuthHttpBasic();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AuthApi->testAuthHttpBasic: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

string

Authorization

http_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

[Back to top] [Back to API list] [Back to Model list] [Back to README]