Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Authentication to see documentation #1032

Open
Assignees
@Sparviero-Sughero

Description

I think there is some problems when you need to share API documentation using auth.
I'm using

$config = new Config([
 'username' => 'aaa',
 'password' => 'bbb',
 'database' => 'ccc',
 'tables' => 'products',
 'openApiBase' => json_encode(array(
 "info" => array(
 "title" => "Title",
 "version" => "1.0.0",
 ),
 "components" => array(
 "securitySchemes" => array(
 "ApiKeyAuth" => array(
 "type" => "apiKey", 
 "in" => "header",
 "name" => "X-API-Key",
 )
 )
 )
 )),
 // auth 
 'apiKeyAuth.mode'=> 'required',
 'middlewares' => 'cors,apiKeyAuth',
 'apiKeyAuth.keys' => 'Vp7LxyEpfwYjSVm',
]);

In https://petstore.swagger.io/?url=https://<your domain>/api.php/openapi there is no way to pass the auth-key.
I think you should define in json the option to enable auth also in swagger (or similar).

Metadata

Metadata

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /