public function authorize()
    {
        $path = $this->endpoint.self::OAUTH_TOKEN;
        $headers = ['Content-Type' => 'application/x-www-form-urlencoded'];
        $body = [
            'client_id'     => $this->client_id,
            'client_secret' => $this->client_secret,
            'grant_type'    => self::GRANT_TYPE,
            'code'          => $this->code,
            'redirect_uri'  => $this->redirect_uri,
        ];

        try {
            $http_response = $this->createNewSession()->request($path, $headers, $body, 'POST');
        } catch (Requests_Exception $e) {
            throw new UnexpectedException($e);
        }

        if ($http_response->status_code >= 200 && $http_response->status_code < 300) {
            return json_decode($http_response->body);
        } elseif ($http_response->status_code >= 400 && $http_response->status_code <= 499) {
            throw new ValidationException($http_response->status_code, $http_response->body);
        }

        throw new UnexpectedException();
    }