Skip to content

missing cookie apiKey authentication mechanism #208

@matteomazza91

Description

@matteomazza91
Description

Security Scheme Object defines that apiKey can be in "query", "header" or "cookie".
Actually the generator allows only "query" and "header" as shown by the following snippet:

if (SecurityScheme.Type.APIKEY.equals(securityScheme.getType())) {
            cs.isBasic = cs.isOAuth = false;
            cs.isApiKey = true;
            cs.keyParamName = securityScheme.getName();
            cs.isKeyInHeader = securityScheme.getIn() == SecurityScheme.In.HEADER;
            cs.isKeyInQuery = !cs.isKeyInHeader;
} 
Suggest a fix/enhancement

I had already proposed a PR to the swagger-codegen project to solve this issue.
I can start working on it right now.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions