We have detected an error in your notification set-up
(Event-ID dab39dc24f564ec7bd4628d1305fd03c).
Currently, we cannot inform you about inspection progress.
Please check that the user
557058:bca11929-8c2d-43f2-8a82-c5416880d395
still has access to your repository or
update the API account.
1 | <?php |
||
23 | class OAuth2Plugin implements Plugin |
||
24 | { |
||
25 | use Plugin\VersionBridgePlugin; |
||
26 | |||
27 | const ENDPOINT_ACCESS_TOKEN = '/oauth2/access_token'; |
||
28 | const ENDPOINT_AUTHORIZE = '/oauth2/authorize'; |
||
29 | |||
30 | /** @var array */ |
||
31 | private $config = array( |
||
32 | 'oauth_client_id' => 'anon', |
||
33 | 'oauth_client_secret' => 'anon', |
||
34 | 'token_type' => 'bearer', |
||
35 | 'scopes' => array() |
||
36 | ); |
||
37 | |||
38 | /** @var ClientInterface */ |
||
39 | private $httpClient; |
||
40 | |||
41 | public function __construct(array $config, ClientInterface $client = null) |
||
52 | |||
53 | /** |
||
54 | * {@inheritDoc} |
||
55 | * |
||
56 | * @throws ForbiddenAccessException |
||
57 | * @throws \InvalidArgumentException |
||
58 | */ |
||
59 | protected function doHandleRequest(RequestInterface $request, callable $next, callable $first) |
||
89 | |||
90 | /** |
||
91 | * Fetch access token with a grant_type of client_credentials |
||
92 | * |
||
93 | * @access public |
||
94 | * @return array |
||
95 | * |
||
96 | * throws \InvalidArgumentException |
||
97 | * @throws HttpResponseException |
||
98 | */ |
||
99 | protected function getAccessToken() |
||
132 | } |
||
133 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.