forked from loafle/openapi-generator-original
[PHP] fix use of isBasic condition (#15520)
This commit is contained in:
parent
b7a9373233
commit
7eeb7f6ed2
@ -144,11 +144,11 @@ No model defined in this package
|
||||
{{/-last}}
|
||||
{{/authMethods}}
|
||||
{{#authMethods}}
|
||||
{{#isBasic}}
|
||||
{{#isBasicBasic}}
|
||||
### Security schema `{{name}}`
|
||||
> Important! To make Basic authentication work you need to extend [\{{authPackage}}\{{abstractNamePrefix}}Authenticator{{abstractNameSuffix}}]({{authSrcPath}}/{{abstractNamePrefix}}Authenticator{{abstractNameSuffix}}.php) class by [\{{authPackage}}\BasicAuthenticator](./src/Auth/BasicAuthenticator.php) class.
|
||||
|
||||
{{/isBasic}}
|
||||
{{/isBasicBasic}}
|
||||
{{#isApiKey}}
|
||||
### Security schema `{{name}}`
|
||||
> Important! To make ApiKey authentication work you need to extend [\{{authPackage}}\{{abstractNamePrefix}}Authenticator{{abstractNameSuffix}}]({{authSrcPath}}/{{abstractNamePrefix}}Authenticator{{abstractNameSuffix}}.php) class by [\{{authPackage}}\ApiKeyAuthenticator](./src/Auth/ApiKeyAuthenticator.php) class.
|
||||
|
@ -194,11 +194,11 @@ No model defined in this package
|
||||
{{/-last}}
|
||||
{{/authMethods}}
|
||||
{{#authMethods}}
|
||||
{{#isBasic}}
|
||||
{{#isBasicBasic}}
|
||||
### Security schema `{{name}}`
|
||||
> Important! To make Basic authentication work you need to extend [\{{authPackage}}\{{abstractNamePrefix}}Authenticator{{abstractNameSuffix}}]({{authSrcPath}}/{{abstractNamePrefix}}Authenticator{{abstractNameSuffix}}.php) class by [\{{authPackage}}\BasicAuthenticator](./src/Auth/BasicAuthenticator.php) class.
|
||||
|
||||
{{/isBasic}}
|
||||
{{/isBasicBasic}}
|
||||
{{#isApiKey}}
|
||||
### Security schema `{{name}}`
|
||||
> Important! To make ApiKey authentication work you need to extend [\{{authPackage}}\{{abstractNamePrefix}}Authenticator{{abstractNameSuffix}}]({{authSrcPath}}/{{abstractNamePrefix}}Authenticator{{abstractNameSuffix}}.php) class by [\{{authPackage}}\ApiKeyAuthenticator](./src/Auth/ApiKeyAuthenticator.php) class.
|
||||
|
@ -156,8 +156,12 @@ Class | Method | HTTP request | Description
|
||||
- **API key parameter name**: {{{keyParamName}}}
|
||||
- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}
|
||||
{{/isApiKey}}
|
||||
{{#isBasic}}- **Type**: HTTP basic authentication
|
||||
{{/isBasic}}
|
||||
{{#isBasicBasic}}- **Type**: HTTP basic authentication
|
||||
{{/isBasicBasic}}
|
||||
{{#isBasicBearer}}- **Type**: HTTP Bearer Token authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}
|
||||
{{/isBasicBearer}}
|
||||
{{#isHttpSignature}}- **Type**: HTTP signature authentication
|
||||
{{/isHttpSignature}}
|
||||
{{#isOAuth}}- **Type**: OAuth
|
||||
- **Flow**: {{{flow}}}
|
||||
- **Authorization URL**: {{{authorizationUrl}}}
|
||||
|
@ -97,10 +97,10 @@ class {{controllerName}} extends Controller
|
||||
$security{{name}} = $request->cookies->get('{{keyParamName}}');
|
||||
{{/isKeyInCookie}}
|
||||
{{/isApiKey}}
|
||||
{{#isBasic}}
|
||||
{{#isBasicBasic}}
|
||||
// HTTP basic authentication required
|
||||
$security{{name}} = $request->headers->get('authorization');
|
||||
{{/isBasic}}
|
||||
{{/isBasicBasic}}
|
||||
{{#isOAuth}}
|
||||
// Oauth required
|
||||
$security{{name}} = $request->headers->get('authorization');
|
||||
|
@ -106,6 +106,10 @@ Class | Method | HTTP request | Description
|
||||
|
||||
- **Type**: Bearer authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}
|
||||
{{/isBasicBearer}}
|
||||
{{#isHttpSignature}}
|
||||
|
||||
- **Type**: HTTP signature authentication
|
||||
{{/isHttpSignature}}
|
||||
{{/isBasic}}
|
||||
{{#isOAuth}}
|
||||
|
||||
|
@ -201,6 +201,8 @@ Authentication schemes defined for the API:
|
||||
|
||||
### http_signature_test
|
||||
|
||||
- **Type**: HTTP signature authentication
|
||||
|
||||
## Tests
|
||||
|
||||
To run the tests, use:
|
||||
|
Loading…
x
Reference in New Issue
Block a user