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

oauth2 + passport Bearer in header is different #295

Closed
romakvikvinia opened this issue Jul 14, 2020 · 1 comment
Closed

oauth2 + passport Bearer in header is different #295

romakvikvinia opened this issue Jul 14, 2020 · 1 comment

Comments

@romakvikvinia
Copy link

what i done wrong ?

when i send request in network tab shows different token ,but when i try curl command in terminal it's work

Annotation in Controller

/**
* @OA\GET(
* path="/api/v1/invoice",
* tags={"Invoice"},
* summary="Retunrs Invoices",
* description="",
* operationId="index",
* security={{"passport": {"*"}}},
* @OA\Response(
* response=200,
* description="successful operation",
* @OA\MediaType(
* mediaType="application/json",
* @OA\Schema(
* type="array",
* @OA\Items(
* ref="#/components/schemas/Invoice"
* )
* )
* ),
* )
*
*
* )
*/

l5-swagger.php

uncommented

/* Open API 3.0 support*/
'passport' => [ // Unique name of security
'type' => 'oauth2', // The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2".
'description' => 'Laravel passport oauth2 security.',
'in' => 'header',
'scheme' => 'https',
'flows' => [
"password" => [
"authorizationUrl" => config('app.url') . '/oauth/authorize',
"tokenUrl" => config('app.url') . '/oauth/token',
"refreshUrl" => config('app.url') . '/token/refresh',
"scopes" => []
],
],
],

rsz_1screen_shot_2020-07-13_at_112505_am

@DarkaOnLine
Copy link
Owner

Please check this thread, maybe you will find your answer here: #57

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