forked from loafle/openapi-generator-original
Add support for Api key in cookie for Symfony (#884)
This commit is contained in:
parent
79dacb20a0
commit
219a88e9c6
@ -87,6 +87,10 @@ class {{controllerName}} extends Controller
|
|||||||
// Set key with prefix in query string
|
// Set key with prefix in query string
|
||||||
$security{{name}} = $request->query->get('{{keyParamName}}');
|
$security{{name}} = $request->query->get('{{keyParamName}}');
|
||||||
{{/isKeyInQuery}}
|
{{/isKeyInQuery}}
|
||||||
|
{{#isKeyInCookie}}
|
||||||
|
// Set key with prefix in cookies
|
||||||
|
$security{{name}} = $request->cookies->get('{{keyParamName}}');
|
||||||
|
{{/isKeyInCookie}}
|
||||||
{{/isApiKey}}
|
{{/isApiKey}}
|
||||||
{{#isBasic}}
|
{{#isBasic}}
|
||||||
// HTTP basic authentication required
|
// HTTP basic authentication required
|
||||||
|
Loading…
x
Reference in New Issue
Block a user