BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
4188c10c
Commit
4188c10c
authored
Nov 17, 2017
by
Francisco Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renaming AuthenticationException to AuthenticationError
parent
7f031791
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
request_authenticator.rb
lib/gitlab/auth/request_authenticator.rb
+1
-1
user_auth_finders.rb
lib/gitlab/auth/user_auth_finders.rb
+8
-8
request_authenticator_spec.rb
spec/lib/gitlab/auth/request_authenticator_spec.rb
+1
-1
No files found.
lib/gitlab/auth/request_authenticator.rb
View file @
4188c10c
...
...
@@ -17,7 +17,7 @@ module Gitlab
def
find_sessionless_user
find_user_from_access_token
||
find_user_from_rss_token
rescue
Gitlab
::
Auth
::
AuthenticationE
xception
rescue
Gitlab
::
Auth
::
AuthenticationE
rror
nil
end
end
...
...
lib/gitlab/auth/user_auth_finders.rb
View file @
4188c10c
...
...
@@ -4,14 +4,14 @@ module Gitlab
# Exceptions
#
AuthenticationE
xception
=
Class
.
new
(
StandardError
)
MissingTokenError
=
Class
.
new
(
AuthenticationE
xception
)
TokenNotFoundError
=
Class
.
new
(
AuthenticationE
xception
)
ExpiredError
=
Class
.
new
(
AuthenticationE
xception
)
RevokedError
=
Class
.
new
(
AuthenticationE
xception
)
UnauthorizedError
=
Class
.
new
(
AuthenticationE
xception
)
class
InsufficientScopeError
<
AuthenticationE
xception
AuthenticationE
rror
=
Class
.
new
(
StandardError
)
MissingTokenError
=
Class
.
new
(
AuthenticationE
rror
)
TokenNotFoundError
=
Class
.
new
(
AuthenticationE
rror
)
ExpiredError
=
Class
.
new
(
AuthenticationE
rror
)
RevokedError
=
Class
.
new
(
AuthenticationE
rror
)
UnauthorizedError
=
Class
.
new
(
AuthenticationE
rror
)
class
InsufficientScopeError
<
AuthenticationE
rror
attr_reader
:scopes
def
initialize
(
scopes
)
@scopes
=
scopes
.
map
{
|
s
|
s
.
try
(
:name
)
||
s
}
...
...
spec/lib/gitlab/auth/request_authenticator_spec.rb
View file @
4188c10c
...
...
@@ -58,7 +58,7 @@ describe Gitlab::Auth::RequestAuthenticator do
expect
(
subject
.
find_sessionless_user
).
to
be_blank
end
it
'rescue
API::APIGuard::AuthenticationException
exceptions'
do
it
'rescue
Gitlab::Auth::AuthenticationError
exceptions'
do
allow_any_instance_of
(
described_class
).
to
receive
(
:find_user_from_access_token
).
and_raise
(
Gitlab
::
Auth
::
UnauthorizedError
)
expect
(
subject
.
find_sessionless_user
).
to
be_blank
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment