yii2-swagger icon indicating copy to clipboard operation
yii2-swagger copied to clipboard

Where Bearer key?

Open koterix opened this issue 6 years ago • 1 comments

Have a problem. Bearer not write before key!

@SWG\SecurityScheme(
    securityDefinition="Bearer",
    type="apiKey",
    name="Authorization",
    in="header"
),

Result: -H "Authorization: r6IesHXXyGqhePR_Rg3o5ULCbgn1eHMn" but must be a -H "Authorization: Bearer r6IesHXXyGqhePR_Rg3o5ULCbgn1eHMn" Sorry for my english ;)

koterix avatar Jun 26 '18 14:06 koterix

tl;dr: Stop using this package. It doesnt support 3.0 version of zircote/swagger-php.

Its available only for openapi 3.0 schema. You must specify additional parameter "bearerFormat". This means you cannot use SWG annotations and you must use OA annotations instead. https://swagger.io/docs/specification/authentication/bearer-authentication/

rvkulikov avatar Jul 12 '18 13:07 rvkulikov