Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
lemonldap-ng
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
258
Issues
258
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LemonLDAP NG
lemonldap-ng
Commits
545a6485
Commit
545a6485
authored
Nov 26, 2018
by
Christophe Maudoux
🐛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve unit test
parent
043292fc
Pipeline
#3522
failed with stages
in 4 minutes and 56 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
2 deletions
+37
-2
lemonldap-ng-portal/t/71-2F-U2F.t
lemonldap-ng-portal/t/71-2F-U2F.t
+0
-1
lemonldap-ng-portal/t/76-2F-Ext-with-HISTORY.t
lemonldap-ng-portal/t/76-2F-Ext-with-HISTORY.t
+37
-1
No files found.
lemonldap-ng-portal/t/71-2F-U2F.t
View file @
545a6485
...
...
@@ -146,7 +146,6 @@ JjTJecOOS+88fK8qL1TrYv5rapIdqUI7aQ==
IO::
String
->
new
('
user=dwho&password=dwho
'),
length
=>
23
,
accept
=>
'
text/html
',
cookie
=>
"
lemonldap=
$id
",
),
'
Auth query
'
);
...
...
lemonldap-ng-portal/t/76-2F-Ext-with-HISTORY.t
View file @
545a6485
...
...
@@ -4,7 +4,7 @@ use IO::String;
use
Data::
Dumper
;
require
'
t/test-lib.pm
';
my
$maintests
=
6
;
my
$maintests
=
10
;
use_ok
('
Lemonldap::NG::Common::FormEncode
');
...
...
@@ -12,9 +12,12 @@ my $client = LLNG::Manager::Test->new(
{
ini
=>
{
logLevel
=>
'
error
',
u2fActivation
=>
'
1
',
totp2fActivation
=>
'
$uid eq "dwho"
',
ext2fActivation
=>
1
,
ext2FSendCommand
=>
'
t/sendOTP.pl -uid $uid
',
ext2FValidateCommand
=>
'
t/vrfyOTP.pl -uid $uid -code $code
',
ext2fLogo
=>
'
yubikey.png
',
loginHistoryEnabled
=>
1
,
authentication
=>
'
Demo
',
userDB
=>
'
Same
',
...
...
@@ -37,6 +40,39 @@ ok(
);
my
(
$host
,
$url
,
$query
)
=
expectForm
(
$res
,
undef
,
'
/2fchoice
',
'
token
',
'
checkLogins
'
);
ok
(
$res
->
[
2
]
->
[
0
]
=~
qq%<img src="/static/bootstrap/u2f.png" alt="u2F" title="u2F" />%
,
'
Found u2f.png
'
)
or
print
STDERR
Dumper
(
$res
->
[
2
]
->
[
0
]
);
ok
(
$res
->
[
2
]
->
[
0
]
=~
qq%<img src="/static/bootstrap/yubikey.png" alt="ext2F" title="ext2F" />%
,
'
Found yubikey.png
'
)
or
print
STDERR
Dumper
(
$res
->
[
2
]
->
[
0
]
);
ok
(
$res
->
[
2
]
->
[
0
]
=~
qq%<img src="/static/bootstrap/totp.png" alt="totp2F" title="totp2F" />%
,
'
Found totp.png
'
)
or
print
STDERR
Dumper
(
$res
->
[
2
]
->
[
0
]
);
$query
.=
'
&sf=ext
';
ok
(
$res
=
$client
->
_post
(
'
/2fchoice
',
IO::
String
->
new
(
$query
),
length
=>
length
(
$query
),
accept
=>
'
text/html
',
),
'
Post ext2f choice
'
);
(
$host
,
$url
,
$query
)
=
expectForm
(
$res
,
undef
,
'
/ext2fcheck
',
'
token
',
'
code
',
'
checkLogins
'
);
ok
(
...
...
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