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}}
|
{{/-last}}
|
||||||
{{/authMethods}}
|
{{/authMethods}}
|
||||||
{{#authMethods}}
|
{{#authMethods}}
|
||||||
{{#isBasic}}
|
{{#isBasicBasic}}
|
||||||
### Security schema `{{name}}`
|
### 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.
|
> 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}}
|
{{#isApiKey}}
|
||||||
### Security schema `{{name}}`
|
### 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.
|
> 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}}
|
{{/-last}}
|
||||||
{{/authMethods}}
|
{{/authMethods}}
|
||||||
{{#authMethods}}
|
{{#authMethods}}
|
||||||
{{#isBasic}}
|
{{#isBasicBasic}}
|
||||||
### Security schema `{{name}}`
|
### 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.
|
> 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}}
|
{{#isApiKey}}
|
||||||
### Security schema `{{name}}`
|
### 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.
|
> 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}}}
|
- **API key parameter name**: {{{keyParamName}}}
|
||||||
- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}
|
- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}
|
||||||
{{/isApiKey}}
|
{{/isApiKey}}
|
||||||
{{#isBasic}}- **Type**: HTTP basic authentication
|
{{#isBasicBasic}}- **Type**: HTTP basic authentication
|
||||||
{{/isBasic}}
|
{{/isBasicBasic}}
|
||||||
|
{{#isBasicBearer}}- **Type**: HTTP Bearer Token authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}
|
||||||
|
{{/isBasicBearer}}
|
||||||
|
{{#isHttpSignature}}- **Type**: HTTP signature authentication
|
||||||
|
{{/isHttpSignature}}
|
||||||
{{#isOAuth}}- **Type**: OAuth
|
{{#isOAuth}}- **Type**: OAuth
|
||||||
- **Flow**: {{{flow}}}
|
- **Flow**: {{{flow}}}
|
||||||
- **Authorization URL**: {{{authorizationUrl}}}
|
- **Authorization URL**: {{{authorizationUrl}}}
|
||||||
|
@ -97,10 +97,10 @@ class {{controllerName}} extends Controller
|
|||||||
$security{{name}} = $request->cookies->get('{{keyParamName}}');
|
$security{{name}} = $request->cookies->get('{{keyParamName}}');
|
||||||
{{/isKeyInCookie}}
|
{{/isKeyInCookie}}
|
||||||
{{/isApiKey}}
|
{{/isApiKey}}
|
||||||
{{#isBasic}}
|
{{#isBasicBasic}}
|
||||||
// HTTP basic authentication required
|
// HTTP basic authentication required
|
||||||
$security{{name}} = $request->headers->get('authorization');
|
$security{{name}} = $request->headers->get('authorization');
|
||||||
{{/isBasic}}
|
{{/isBasicBasic}}
|
||||||
{{#isOAuth}}
|
{{#isOAuth}}
|
||||||
// Oauth required
|
// Oauth required
|
||||||
$security{{name}} = $request->headers->get('authorization');
|
$security{{name}} = $request->headers->get('authorization');
|
||||||
|
@ -106,6 +106,10 @@ Class | Method | HTTP request | Description
|
|||||||
|
|
||||||
- **Type**: Bearer authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}
|
- **Type**: Bearer authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}
|
||||||
{{/isBasicBearer}}
|
{{/isBasicBearer}}
|
||||||
|
{{#isHttpSignature}}
|
||||||
|
|
||||||
|
- **Type**: HTTP signature authentication
|
||||||
|
{{/isHttpSignature}}
|
||||||
{{/isBasic}}
|
{{/isBasic}}
|
||||||
{{#isOAuth}}
|
{{#isOAuth}}
|
||||||
|
|
||||||
|
@ -201,6 +201,8 @@ Authentication schemes defined for the API:
|
|||||||
|
|
||||||
### http_signature_test
|
### http_signature_test
|
||||||
|
|
||||||
|
- **Type**: HTTP signature authentication
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
To run the tests, use:
|
To run the tests, use:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user