Skip to content
New issue

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

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

Already on GitHub? # to your account

Wrong authentication method in example using apiKey. #42

Open
kristianstarkloffjedox opened this issue Oct 17, 2023 · 1 comment
Open

Comments

@kristianstarkloffjedox
Copy link

kristianstarkloffjedox commented Oct 17, 2023

In idoc.php config file, I have this security settings:

    'security' => [
        'apiToken' => [
            'type' => 'apiKey',
            'name' => 'apiToken',
            'in' => 'header',
            'description' => 'Use `apiToken` in the requests.'
        ],
    ],

When I create the docs with php artisan idoc:generate the examples are created with Bearer JWT Token:

curl -X GET -G "http://localhost/api/myapiurl" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJod"

Edit

I tried to use the specification from here: https://spec.openapis.org/oas/v3.1.0#api-key-sample

@ovac
Copy link
Owner

ovac commented Oct 22, 2023

Thank you very much @kristianstarkloffjedox

Can you draft a pull-request with the fix for review?
Upon merge and release, you'll be added to the contributors list.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants