forked from loafle/openapi-generator-original
Remove API Key Authentication code for go when cookie is used. (#1601)
This commit is contained in:
parent
b4c36425c2
commit
cd1885d29e
@ -236,6 +236,7 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams}
|
|||||||
{{/hasBodyParam}}
|
{{/hasBodyParam}}
|
||||||
{{#authMethods}}
|
{{#authMethods}}
|
||||||
{{#isApiKey}}
|
{{#isApiKey}}
|
||||||
|
{{^isKeyInCookie}}
|
||||||
if ctx != nil {
|
if ctx != nil {
|
||||||
// API Key Authentication
|
// API Key Authentication
|
||||||
if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
|
if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
|
||||||
@ -253,7 +254,7 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams}
|
|||||||
{{/isKeyInQuery}}
|
{{/isKeyInQuery}}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
{{/isKeyInCookie}}
|
||||||
{{/isApiKey}}
|
{{/isApiKey}}
|
||||||
{{/authMethods}}
|
{{/authMethods}}
|
||||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user