mattcollins171 / oauth2-osm

League OAuth2 Provider library for OSM
MIT License
4 stars 1 forks source link

Missing GetToken Method #2

Open NeoWeb-JP opened 3 years ago

NeoWeb-JP commented 3 years ago

Class is missing this method to renew tokens ` public function getAccessToken($grant, array $options = []) { $grant = $this->verifyGrant($grant);

    $params = [
        'client_id'     => $this->clientId,
        'client_secret' => $this->clientSecret,
        'redirect_uri'  => $this->redirectUri,
    ];

    $params   = $grant->prepareRequestParameters($params, $options);
    $request  = $this->getAccessTokenRequest($params);
    $response = $this->getParsedResponse($request);
    if (false === is_array($response)) {
        throw new UnexpectedValueException(
            'Invalid response received from Authorization Server. Expected JSON.'
        );
    }
    $prepared = $this->prepareAccessTokenResponse($response);
    $token    = $this->createAccessToken($prepared, $grant);

    return $token;
}`