Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NFR] Support security for the Operation #2280

Closed
ovr opened this issue Jul 18, 2016 · 5 comments
Closed

[NFR] Support security for the Operation #2280

ovr opened this issue Jul 18, 2016 · 5 comments

Comments

@ovr
Copy link

ovr commented Jul 18, 2016

Hey!
From subject

    /**
     * @SWG\Post(
     *  tags={"Note"},
     *  path="/note",
     *  operationId="createNote",
     *  summary="Create note",
     *  security="jwt",
     * .....
     */

Security check need to be shown in operation
Related Open Api example

https://github.com/OAI/OpenAPI-Specification/blob/49f4c8b3c01fc5180b3cd46afe4f1a7ff049eefe/schemas/v2.0/schema.json#L301

Thanks

@webron
Copy link
Contributor

webron commented Jul 18, 2016

There is support for security, there's no support for jwt as it's not part of the spec. See #818.

@webron webron closed this as completed Jul 18, 2016
@ovr
Copy link
Author

ovr commented Jul 19, 2016

@webron

Operation is not showing anything that it require any security scheme

image

And btw security in Operation is not a type, it's a name of security definition, I can name it like jwt, test or something else

ping @fehguy

@webron
Copy link
Contributor

webron commented Jul 19, 2016

Right you are, however, without sharing the full spec, there's not much we can do to investigate. Just a security is not enough, you need to have a securityDefinitions as well with that security scheme defined. If you provide us with the spec we can investigate further.

@webron webron reopened this Jul 19, 2016
@ovr
Copy link
Author

ovr commented Jul 20, 2016

My Security Definition

{
    "securityDefinitions": {
        "jwt": {
            "type": "apiKey",
            "description": "JWT token created from POST /token",
            "name": "X-AUTH-TOKEN",
            "in": "header"
        }
    }
}

Auth modal is working for me, but operation didnt require it
For example it can open modal after clicking on "try it" button

And show that this operation is required

If full spec is needed I can extract it from the project as an example to test

Thanks 🍺

@webron
Copy link
Contributor

webron commented Jul 20, 2016

Yeah, the full spec would help, thanks.

@webron webron closed this as completed Mar 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants