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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xavier Bachelot
lemonldap-ng
Commits
86283952
Commit
86283952
authored
May 15, 2018
by
Yadd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix partially #1422
parent
80c76b18
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
32 deletions
+22
-32
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/CAS.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/CAS.pm
+5
-18
lemonldap-ng-portal/t/31-Auth-and-issuer-CAS-with-choice.t
lemonldap-ng-portal/t/31-Auth-and-issuer-CAS-with-choice.t
+17
-14
No files found.
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/CAS.pm
View file @
86283952
...
...
@@ -16,10 +16,6 @@ our $VERSION = '2.0.0';
extends
'
Lemonldap::NG::Portal::Main::Issuer
',
'
Lemonldap::NG::Portal::Lib::CAS
';
# INTERFACE
sub
beforeAuth
{
'
exportRequestParameters
'
}
# INITIALIZATION
sub
init
{
...
...
@@ -84,7 +80,11 @@ sub run {
my
$casServiceTicket
;
# Renew
if
(
$renew
and
$renew
eq
'
true
'
)
{
if
(
$renew
and
$renew
eq
'
true
'
and
time
-
$req
->
sessionInfo
->
{
_utime
}
>
$self
->
conf
->
{
portalForceAuthnInterval
}
)
{
# Authentication must be replayed
$self
->
logger
->
debug
("
Authentication renew requested
");
...
...
@@ -707,17 +707,4 @@ sub _validate2 {
$casProxyGrantingTicketIOU
,
$proxies
,
$attributes
);
}
# Store request parameters in %ENV
sub
exportRequestParameters
{
my
(
$self
,
$req
)
=
@_
;
foreach
my
$param
(
qw/service renew gateway/
)
{
if
(
$req
->
param
(
$param
)
)
{
$req
->
env
->
{
"
llng_cas_
"
.
$param
}
=
$req
->
param
(
$param
);
}
}
return
PE_OK
;
}
1
;
lemonldap-ng-portal/t/31-Auth-and-issuer-CAS-with-choice.t
View file @
86283952
...
...
@@ -132,6 +132,7 @@ SKIP: {
# Back to SP
switch
('
sp
');
# Follow redirection to CAS app
ok
(
$res
=
$sp
->
_get
(
...
...
@@ -216,11 +217,12 @@ SKIP: {
'
Follow redirection
'
);
(
$query
)
=
expectRedirection
(
$res
,
qr#http://auth.sp.com/?\?(ticket=.*)$#
);
(
$query
)
=
expectRedirection
(
$res
,
qr#http://auth.sp.com/?\?(ticket=.*)$#
);
# Follow redirection to CAS app
switch
('
sp
');
ok
(
$res
=
$sp
->
_get
('
/
',
query
=>
$query
),'
Follow redirection
'
);
ok
(
$res
=
$sp
->
_get
(
'
/
',
query
=>
$query
),
'
Follow redirection
'
);
expectCookie
(
$res
);
...
...
@@ -313,18 +315,19 @@ sub issuer {
demo
=>
'
Demo;Demo;Demo
',
sql
=>
'
DBI;DBI;DBI
',
},
dbiAuthChain
=>
'
dbi:SQLite:dbname=t/userdb.db
',
dbiAuthUser
=>
'',
dbiAuthPassword
=>
'',
dbiAuthTable
=>
'
users
',
dbiAuthLoginCol
=>
'
user
',
dbiAuthPasswordCol
=>
'
password
',
dbiAuthPasswordHash
=>
'',
issuerDBCASActivation
=>
1
,
casAttr
=>
'
uid
',
casAttributes
=>
{
cn
=>
'
cn
',
uid
=>
'
uid
',
},
casAccessControlPolicy
=>
'
none
',
multiValuesSeparator
=>
'
;
',
dbiAuthChain
=>
'
dbi:SQLite:dbname=t/userdb.db
',
dbiAuthUser
=>
'',
dbiAuthPassword
=>
'',
dbiAuthTable
=>
'
users
',
dbiAuthLoginCol
=>
'
user
',
dbiAuthPasswordCol
=>
'
password
',
dbiAuthPasswordHash
=>
'',
issuerDBCASActivation
=>
1
,
casAttr
=>
'
uid
',
casAttributes
=>
{
cn
=>
'
cn
',
uid
=>
'
uid
',
},
casAccessControlPolicy
=>
'
none
',
multiValuesSeparator
=>
'
;
',
portalForceAuthnInterval
=>
-
1
,
}
}
);
...
...
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