Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-20 21:42:06 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-20 21:42:06 +0300
commit6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch)
tree78be5963ec075d80116a932011d695dd33910b4e /lib/gitlab/external_authorization/response.rb
parent1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff)
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'lib/gitlab/external_authorization/response.rb')
-rw-r--r--lib/gitlab/external_authorization/response.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/gitlab/external_authorization/response.rb b/lib/gitlab/external_authorization/response.rb
index 04f9688fad0..8656065303d 100644
--- a/lib/gitlab/external_authorization/response.rb
+++ b/lib/gitlab/external_authorization/response.rb
@@ -5,16 +5,16 @@ module Gitlab
class Response
include ::Gitlab::Utils::StrongMemoize
- def initialize(excon_response)
- @excon_response = excon_response
+ def initialize(response)
+ @response = response
end
def valid?
- @excon_response && [200, 401, 403].include?(@excon_response.status)
+ @response && [200, 401, 403].include?(@response.code)
end
def successful?
- valid? && @excon_response.status == 200
+ valid? && @response.code == 200
end
def reason
@@ -28,7 +28,7 @@ module Gitlab
end
def parse_response!
- Gitlab::Json.parse(@excon_response.body)
+ Gitlab::Json.parse(@response.body)
rescue JSON::JSONError
# The JSON response is optional, so don't fail when it's missing
nil