From 4188c10c07d7b9bfaee5046ecfcc88cf8cca456b Mon Sep 17 00:00:00 2001 From: Francisco Lopez Date: Fri, 17 Nov 2017 13:33:21 +0100 Subject: Renaming AuthenticationException to AuthenticationError --- lib/gitlab/auth/request_authenticator.rb | 2 +- lib/gitlab/auth/user_auth_finders.rb | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'lib') diff --git a/lib/gitlab/auth/request_authenticator.rb b/lib/gitlab/auth/request_authenticator.rb index 4322fb83cdf..46ec040ce92 100644 --- a/lib/gitlab/auth/request_authenticator.rb +++ b/lib/gitlab/auth/request_authenticator.rb @@ -17,7 +17,7 @@ module Gitlab def find_sessionless_user find_user_from_access_token || find_user_from_rss_token - rescue Gitlab::Auth::AuthenticationException + rescue Gitlab::Auth::AuthenticationError nil end end diff --git a/lib/gitlab/auth/user_auth_finders.rb b/lib/gitlab/auth/user_auth_finders.rb index cd497fe1cdb..b4114a3ac96 100644 --- a/lib/gitlab/auth/user_auth_finders.rb +++ b/lib/gitlab/auth/user_auth_finders.rb @@ -4,14 +4,14 @@ module Gitlab # Exceptions # - AuthenticationException = Class.new(StandardError) - MissingTokenError = Class.new(AuthenticationException) - TokenNotFoundError = Class.new(AuthenticationException) - ExpiredError = Class.new(AuthenticationException) - RevokedError = Class.new(AuthenticationException) - UnauthorizedError = Class.new(AuthenticationException) - - class InsufficientScopeError < AuthenticationException + AuthenticationError = Class.new(StandardError) + MissingTokenError = Class.new(AuthenticationError) + TokenNotFoundError = Class.new(AuthenticationError) + ExpiredError = Class.new(AuthenticationError) + RevokedError = Class.new(AuthenticationError) + UnauthorizedError = Class.new(AuthenticationError) + + class InsufficientScopeError < AuthenticationError attr_reader :scopes def initialize(scopes) @scopes = scopes.map { |s| s.try(:name) || s } -- cgit v1.2.1