Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp-module-cesnet
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp-module-cesnet
Commits
c0a022d9
Unverified
Commit
c0a022d9
authored
3 years ago
by
Pavel Vyskočil
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #44 from vyskocilpavel/fix_iscesneteligible
fix: fix duplicate or unused consts
parents
762e5468
ef595e0a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/Auth/Process/IsCesnetEligible.php
+1
-34
1 addition, 34 deletions
lib/Auth/Process/IsCesnetEligible.php
with
1 addition
and
34 deletions
lib/Auth/Process/IsCesnetEligible.php
+
1
−
34
View file @
c0a022d9
...
@@ -7,14 +7,10 @@ namespace SimpleSAML\Module\cesnet\Auth\Process;
...
@@ -7,14 +7,10 @@ namespace SimpleSAML\Module\cesnet\Auth\Process;
use
SimpleSAML\Auth\ProcessingFilter
;
use
SimpleSAML\Auth\ProcessingFilter
;
use
SimpleSAML\Configuration
;
use
SimpleSAML\Configuration
;
use
SimpleSAML\Error\Exception
;
use
SimpleSAML\Error\Exception
;
use
SimpleSAML\Error\Exception
;
use
SimpleSAML\Logger
;
use
SimpleSAML\Logger
;
use
SimpleSAML\Logger
;
use
SimpleSAML\Module
;
use
SimpleSAML\Module
;
use
SimpleSAML\Module\perun\Adapter
;
use
SimpleSAML\Module\perun\Adapter
;
use
SimpleSAML\Module\perun\AdapterLdap
;
use
SimpleSAML\Module\perun\AdapterLdap
;
use
SimpleSAML\Module\perun\AdapterLdap
;
use
SimpleSAML\Module\perun\AdapterRpc
;
use
SimpleSAML\Module\perun\AdapterRpc
;
use
SimpleSAML\Module\perun\AdapterRpc
;
use
SimpleSAML\Module\perun\ChallengeManager
;
use
SimpleSAML\Module\perun\ChallengeManager
;
use
SimpleSAML\Module\perun\LdapConnector
;
use
SimpleSAML\Module\perun\LdapConnector
;
...
@@ -48,26 +44,6 @@ class IsCesnetEligible extends ProcessingFilter
...
@@ -48,26 +44,6 @@ class IsCesnetEligible extends ProcessingFilter
public
const
SCRIPT_NAME
=
'updateIsCesnetEligible'
;
public
const
SCRIPT_NAME
=
'updateIsCesnetEligible'
;
public
const
INTERFACE_PROPNAME
=
'interface'
;
public
const
ATTR_NAME
=
'attrName'
;
public
const
RPC_ATTRIBUTE_NAME
=
'RPC.attributeName'
;
public
const
LDAP_ATTRIBUTE_NAME
=
'LDAP.attributeName'
;
public
const
DEFAULT_ATTR_NAME
=
'isCesnetEligibleLastSeen'
;
public
const
LDAP
=
'LDAP'
;
public
const
RPC
=
'RPC'
;
public
const
SCRIPT_NAME
=
'updateIsCesnetEligible'
;
public
const
PATH_TO_KEY
=
'pathToKey'
;
public
const
SIGNATURE_ALG
=
'signatureAlg'
;
public
const
PERUN_USER_AFFILIATIONS_ATTR_NAME
=
'perunUserAffiliationsAttrName'
;
public
const
PERUN_USER_AFFILIATIONS_ATTR_NAME
=
'perunUserAffiliationsAttrName'
;
public
const
PERUN_USER_SPONSORING_ORGANIZATIONS_ATTR_NAME
=
'perunUserSponsoringOrganizationsAttrName'
;
public
const
PERUN_USER_SPONSORING_ORGANIZATIONS_ATTR_NAME
=
'perunUserSponsoringOrganizationsAttrName'
;
...
@@ -173,15 +149,6 @@ class IsCesnetEligible extends ProcessingFilter
...
@@ -173,15 +149,6 @@ class IsCesnetEligible extends ProcessingFilter
);
);
}
}
$isHostelVerified
=
false
;
if
(
$request
[
'saml:sp:IdP'
]
===
self
::
HOSTEL_ENTITY_ID
&&
isset
(
$request
[
'Attributes'
][
'loa'
])
&&
(
int
)
$request
[
'Attributes'
][
'loa'
][
0
]
===
2
)
{
$isHostelVerified
=
true
;
Logger
::
debug
(
'cesnet:IsCesnetEligible - The user was verified by Hostel.'
);
}
if
(
!
empty
(
$user
))
{
if
(
!
empty
(
$user
))
{
if
(
$this
->
interface
===
self
::
LDAP
)
{
if
(
$this
->
interface
===
self
::
LDAP
)
{
$attrs
=
$this
->
adapter
->
getUserAttributes
(
$user
,
[
$this
->
ldapAttrName
]);
$attrs
=
$this
->
adapter
->
getUserAttributes
(
$user
,
[
$this
->
ldapAttrName
]);
...
@@ -196,7 +163,7 @@ class IsCesnetEligible extends ProcessingFilter
...
@@ -196,7 +163,7 @@ class IsCesnetEligible extends ProcessingFilter
}
}
}
}
if
(
$isHostelVerified
||
(
!
empty
(
$this
->
eduPersonScopedAffiliation
)
&&
$this
->
isCesnetEligible
(
$user
))
)
{
if
(
!
empty
(
$this
->
eduPersonScopedAffiliation
)
&&
$this
->
isCesnetEligible
(
$user
))
{
$this
->
cesnetEligibleLastSeenValue
=
date
(
'Y-m-d H:i:s'
);
$this
->
cesnetEligibleLastSeenValue
=
date
(
'Y-m-d H:i:s'
);
if
(
!
empty
(
$user
))
{
if
(
!
empty
(
$user
))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment