src/AuthorizationServer.php
public function issueAccessToken()
    {
        $grantType = $this->requestHandler->getParam('grant_type');
        if (is_null($grantType)) {
            throw new Exception\InvalidRequestException('grant_type');
        }

        // Ensure grant type is one that is recognised and is enabled
        if (!in_array($grantType, array_keys($this->grantTypes))) {
            throw new Exception\UnsupportedGrantTypeException($grantType);
        }

        // Complete the flow
        return $this->getGrantType($grantType)->grant();
    }
public function issueAccessToken()
    {
        $grantType = $this->requestHandler->getParam('grant_type');
        if (is_null($grantType)) {
            throw new Exception\InvalidRequestException('grant_type');
        }

        // Ensure grant type is one that is recognised and is enabled
        if (!in_array($grantType, array_keys($this->grantTypes))) {
            throw new Exception\UnsupportedGrantTypeException($grantType);
        }

        // Complete the flow
        return $this->getGrantType($grantType)->grant();
    }
Issue an access token

@return array Authorise request parameters

@throws