Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
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
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
lib/gitlab/auth/request_authenticator.rb
lib/gitlab/auth/request_authenticator.rb
+1
-1
lib/gitlab/auth/user_auth_finders.rb
lib/gitlab/auth/user_auth_finders.rb
+8
-8
spec/lib/gitlab/auth/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
...
@@ -17,7 +17,7 @@ module Gitlab
def
find_sessionless_user
def
find_sessionless_user
find_user_from_access_token
||
find_user_from_rss_token
find_user_from_access_token
||
find_user_from_rss_token
rescue
Gitlab
::
Auth
::
AuthenticationE
xception
rescue
Gitlab
::
Auth
::
AuthenticationE
rror
nil
nil
end
end
end
end
...
...
lib/gitlab/auth/user_auth_finders.rb
View file @
4188c10c
...
@@ -4,14 +4,14 @@ module Gitlab
...
@@ -4,14 +4,14 @@ module Gitlab
# Exceptions
# Exceptions
#
#
AuthenticationE
xception
=
Class
.
new
(
StandardError
)
AuthenticationE
rror
=
Class
.
new
(
StandardError
)
MissingTokenError
=
Class
.
new
(
AuthenticationE
xception
)
MissingTokenError
=
Class
.
new
(
AuthenticationE
rror
)
TokenNotFoundError
=
Class
.
new
(
AuthenticationE
xception
)
TokenNotFoundError
=
Class
.
new
(
AuthenticationE
rror
)
ExpiredError
=
Class
.
new
(
AuthenticationE
xception
)
ExpiredError
=
Class
.
new
(
AuthenticationE
rror
)
RevokedError
=
Class
.
new
(
AuthenticationE
xception
)
RevokedError
=
Class
.
new
(
AuthenticationE
rror
)
UnauthorizedError
=
Class
.
new
(
AuthenticationE
xception
)
UnauthorizedError
=
Class
.
new
(
AuthenticationE
rror
)
class
InsufficientScopeError
<
AuthenticationE
xception
class
InsufficientScopeError
<
AuthenticationE
rror
attr_reader
:scopes
attr_reader
:scopes
def
initialize
(
scopes
)
def
initialize
(
scopes
)
@scopes
=
scopes
.
map
{
|
s
|
s
.
try
(
:name
)
||
s
}
@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
...
@@ -58,7 +58,7 @@ describe Gitlab::Auth::RequestAuthenticator do
expect
(
subject
.
find_sessionless_user
).
to
be_blank
expect
(
subject
.
find_sessionless_user
).
to
be_blank
end
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
)
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
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