diff options
author | Francisco Lopez <fjlopez@gitlab.com> | 2017-11-17 13:33:21 +0100 |
---|---|---|
committer | Francisco Lopez <fjlopez@gitlab.com> | 2017-11-17 13:33:21 +0100 |
commit | 4188c10c07d7b9bfaee5046ecfcc88cf8cca456b (patch) | |
tree | fce91b81fe42eb741fd3087e97a0449ba5efdcbe /lib/gitlab/auth/user_auth_finders.rb | |
parent | 7f0317917a6684189b1637ea73f90d258e8a72b6 (diff) | |
download | gitlab-ce-4188c10c07d7b9bfaee5046ecfcc88cf8cca456b.tar.gz |
Renaming AuthenticationException to AuthenticationErrormk-add-user-rate-limits
Diffstat (limited to 'lib/gitlab/auth/user_auth_finders.rb')
-rw-r--r-- | lib/gitlab/auth/user_auth_finders.rb | 16 |
1 files changed, 8 insertions, 8 deletions
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 } |