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
11c04a00
Commit
11c04a00
authored
May 27, 2020
by
Jan Beckmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move u2f into shared authentication folder
By @pslaughter
parent
b1527121
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
29 additions
and
17 deletions
+29
-17
app/assets/javascripts/authentication/mount_2fa.js
app/assets/javascripts/authentication/mount_2fa.js
+14
-0
app/assets/javascripts/authentication/u2f/authenticate.js
app/assets/javascripts/authentication/u2f/authenticate.js
+0
-0
app/assets/javascripts/authentication/u2f/error.js
app/assets/javascripts/authentication/u2f/error.js
+0
-0
app/assets/javascripts/authentication/u2f/index.js
app/assets/javascripts/authentication/u2f/index.js
+2
-2
app/assets/javascripts/authentication/u2f/register.js
app/assets/javascripts/authentication/u2f/register.js
+0
-0
app/assets/javascripts/authentication/u2f/util.js
app/assets/javascripts/authentication/u2f/util.js
+0
-0
app/assets/javascripts/pages/ldap/omniauth_callbacks/index.js
...assets/javascripts/pages/ldap/omniauth_callbacks/index.js
+2
-2
app/assets/javascripts/pages/omniauth_callbacks/index.js
app/assets/javascripts/pages/omniauth_callbacks/index.js
+2
-2
app/assets/javascripts/pages/profiles/two_factor_auths/index.js
...sets/javascripts/pages/profiles/two_factor_auths/index.js
+2
-4
app/assets/javascripts/pages/sessions/index.js
app/assets/javascripts/pages/sessions/index.js
+2
-2
ee/app/assets/javascripts/pages/groups/omniauth_callbacks/index.js
...sets/javascripts/pages/groups/omniauth_callbacks/index.js
+2
-2
spec/frontend/authentication/u2f/authenticate_spec.js
spec/frontend/authentication/u2f/authenticate_spec.js
+1
-1
spec/frontend/authentication/u2f/mock_u2f_device.js
spec/frontend/authentication/u2f/mock_u2f_device.js
+0
-0
spec/frontend/authentication/u2f/register_spec.js
spec/frontend/authentication/u2f/register_spec.js
+1
-1
spec/frontend/authentication/u2f/util_spec.js
spec/frontend/authentication/u2f/util_spec.js
+1
-1
No files found.
app/assets/javascripts/authentication/mount_2fa.js
0 → 100644
View file @
11c04a00
import
$
from
'
jquery
'
;
import
initU2F
from
'
./u2f
'
;
import
U2FRegister
from
'
./u2f/register
'
;
export
const
mount2faAuthentication
=
()
=>
{
// Soon this will conditionally mount a webauthn app (see https://gitlab.com/gitlab-org/gitlab/-/merge_requests/26692)
initU2F
();
};
export
const
mount2faRegistration
=
()
=>
{
// Soon this will conditionally mount a webauthn app (see https://gitlab.com/gitlab-org/gitlab/-/merge_requests/26692)
const
u2fRegister
=
new
U2FRegister
(
$
(
'
#js-register-u2f
'
),
gon
.
u2f
);
u2fRegister
.
start
();
};
app/assets/javascripts/u2f/authenticate.js
→
app/assets/javascripts/
authentication/
u2f/authenticate.js
View file @
11c04a00
File moved
app/assets/javascripts/u2f/error.js
→
app/assets/javascripts/
authentication/
u2f/error.js
View file @
11c04a00
File moved
app/assets/javascripts/
shared/sessions/u2f
.js
→
app/assets/javascripts/
authentication/u2f/index
.js
View file @
11c04a00
import
$
from
'
jquery
'
;
import
U2FAuthenticate
from
'
.
./../u2f
/authenticate
'
;
import
U2FAuthenticate
from
'
./authenticate
'
;
export
default
()
=>
{
if
(
!
gon
.
u2f
)
return
;
...
...
@@ -12,6 +12,6 @@ export default () => {
document
.
querySelector
(
'
.js-2fa-form
'
),
);
u2fAuthenticate
.
start
();
// needed in rspec
// needed in rspec
(FakeU2fDevice)
gl
.
u2fAuthenticate
=
u2fAuthenticate
;
};
app/assets/javascripts/u2f/register.js
→
app/assets/javascripts/
authentication/
u2f/register.js
View file @
11c04a00
File moved
app/assets/javascripts/u2f/util.js
→
app/assets/javascripts/
authentication/
u2f/util.js
View file @
11c04a00
File moved
app/assets/javascripts/pages/ldap/omniauth_callbacks/index.js
View file @
11c04a00
import
initU2F
from
'
../../../shared/sessions/u2f
'
;
import
{
mount2faAuthentication
}
from
'
~/authentication/mount_2fa
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
initU2F
);
document
.
addEventListener
(
'
DOMContentLoaded
'
,
mount2faAuthentication
);
app/assets/javascripts/pages/omniauth_callbacks/index.js
View file @
11c04a00
import
initU2F
from
'
../../shared/sessions/u2f
'
;
import
{
mount2faAuthentication
}
from
'
~/authentication/mount_2fa
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
initU2F
);
document
.
addEventListener
(
'
DOMContentLoaded
'
,
mount2faAuthentication
);
app/assets/javascripts/pages/profiles/two_factor_auths/index.js
View file @
11c04a00
import
$
from
'
jquery
'
;
import
U2FRegister
from
'
~/u2f/register
'
;
import
{
parseBoolean
}
from
'
~/lib/utils/common_utils
'
;
import
{
mount2faRegistration
}
from
'
~/authentication/mount_2fa
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
const
twoFactorNode
=
document
.
querySelector
(
'
.js-two-factor-auth
'
);
...
...
@@ -12,6 +11,5 @@ document.addEventListener('DOMContentLoaded', () => {
if
(
flashAlert
)
flashAlert
.
insertAdjacentHTML
(
'
beforeend
'
,
button
);
}
const
u2fRegister
=
new
U2FRegister
(
$
(
'
#js-register-u2f
'
),
gon
.
u2f
);
u2fRegister
.
start
();
mount2faRegistration
();
});
app/assets/javascripts/pages/sessions/index.js
View file @
11c04a00
import
initU2F
from
'
../../shared/sessions/u2f
'
;
import
{
mount2faAuthentication
}
from
'
~/authentication/mount_2fa
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
initU2F
);
document
.
addEventListener
(
'
DOMContentLoaded
'
,
mount2faAuthentication
);
ee/app/assets/javascripts/pages/groups/omniauth_callbacks/index.js
View file @
11c04a00
import
initU2F
from
'
~/shared/sessions/u2f
'
;
import
{
mount2faAuthentication
}
from
'
~/authentication/mount_2fa
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
initU2F
);
document
.
addEventListener
(
'
DOMContentLoaded
'
,
mount2faAuthentication
);
spec/frontend/u2f/authenticate_spec.js
→
spec/frontend/
authentication/
u2f/authenticate_spec.js
View file @
11c04a00
import
$
from
'
jquery
'
;
import
U2FAuthenticate
from
'
~/u2f/authenticate
'
;
import
U2FAuthenticate
from
'
~/
authentication/
u2f/authenticate
'
;
import
'
vendor/u2f
'
;
import
MockU2FDevice
from
'
./mock_u2f_device
'
;
...
...
spec/frontend/u2f/mock_u2f_device.js
→
spec/frontend/
authentication/
u2f/mock_u2f_device.js
View file @
11c04a00
File moved
spec/frontend/u2f/register_spec.js
→
spec/frontend/
authentication/
u2f/register_spec.js
View file @
11c04a00
import
$
from
'
jquery
'
;
import
U2FRegister
from
'
~/u2f/register
'
;
import
U2FRegister
from
'
~/
authentication/
u2f/register
'
;
import
'
vendor/u2f
'
;
import
MockU2FDevice
from
'
./mock_u2f_device
'
;
...
...
spec/frontend/u2f/util_spec.js
→
spec/frontend/
authentication/
u2f/util_spec.js
View file @
11c04a00
import
{
canInjectU2fApi
}
from
'
~/u2f/util
'
;
import
{
canInjectU2fApi
}
from
'
~/
authentication/
u2f/util
'
;
describe
(
'
U2F Utils
'
,
()
=>
{
describe
(
'
canInjectU2fApi
'
,
()
=>
{
...
...
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