Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cines Vitamui
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dad
Cines Vitamui
Commits
7d3c3841
Commit
7d3c3841
authored
3 years ago
by
Jérôme LELEU
Committed by
Benaissa BENARBIA
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
CAS: Fix the providers reloading
parent
99ba7400
No related branches found
Branches containing commit
No related tags found
1 merge request
!51
Merge mis a jour vitam-ui
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cas/cas-server/src/main/java/org/pac4j/core/client/Clients.java
+27
-25
27 additions, 25 deletions
...s-server/src/main/java/org/pac4j/core/client/Clients.java
with
27 additions
and
25 deletions
cas/cas-server/src/main/java/org/pac4j/core/client/Clients.java
+
27
−
25
View file @
7d3c3841
...
...
@@ -66,36 +66,38 @@ public class Clients {
// the clients list has changed or has not been initialized yet
if
(
oldClientsHash
==
null
||
oldClientsHash
.
intValue
()
!=
clients
.
hashCode
())
{
synchronized
(
this
)
{
clientsMap
=
new
HashMap
<>();
for
(
final
var
client
:
this
.
clients
)
{
final
var
name
=
client
.
getName
();
CommonHelper
.
assertNotBlank
(
"name"
,
name
);
final
var
lowerTrimmedName
=
name
.
toLowerCase
().
trim
();
if
(
clientsMap
.
containsKey
(
lowerTrimmedName
))
{
throw
new
TechnicalException
(
"Duplicate name in clients: "
+
name
);
}
clientsMap
.
put
(
lowerTrimmedName
,
client
);
if
(
client
instanceof
IndirectClient
)
{
final
var
indirectClient
=
(
IndirectClient
)
client
;
if
(
this
.
callbackUrl
!=
null
&&
indirectClient
.
getCallbackUrl
()
==
null
)
{
indirectClient
.
setCallbackUrl
(
this
.
callbackUrl
);
}
if
(
this
.
urlResolver
!=
null
&&
indirectClient
.
getUrlResolver
()
==
null
)
{
indirectClient
.
setUrlResolver
(
this
.
urlResolver
);
if
(
oldClientsHash
==
null
||
oldClientsHash
.
intValue
()
!=
clients
.
hashCode
())
{
clientsMap
=
new
HashMap
<>();
for
(
final
var
client
:
this
.
clients
)
{
final
var
name
=
client
.
getName
();
CommonHelper
.
assertNotBlank
(
"name"
,
name
);
final
var
lowerTrimmedName
=
name
.
toLowerCase
().
trim
();
if
(
clientsMap
.
containsKey
(
lowerTrimmedName
))
{
throw
new
TechnicalException
(
"Duplicate name in clients: "
+
name
);
}
if
(
this
.
callbackUrlResolver
!=
null
&&
indirectClient
.
getCallbackUrlResolver
()
==
null
)
{
indirectClient
.
setCallbackUrlResolver
(
this
.
callbackUrlResolver
);
clientsMap
.
put
(
lowerTrimmedName
,
client
);
if
(
client
instanceof
IndirectClient
)
{
final
var
indirectClient
=
(
IndirectClient
)
client
;
if
(
this
.
callbackUrl
!=
null
&&
indirectClient
.
getCallbackUrl
()
==
null
)
{
indirectClient
.
setCallbackUrl
(
this
.
callbackUrl
);
}
if
(
this
.
urlResolver
!=
null
&&
indirectClient
.
getUrlResolver
()
==
null
)
{
indirectClient
.
setUrlResolver
(
this
.
urlResolver
);
}
if
(
this
.
callbackUrlResolver
!=
null
&&
indirectClient
.
getCallbackUrlResolver
()
==
null
)
{
indirectClient
.
setCallbackUrlResolver
(
this
.
callbackUrlResolver
);
}
if
(
this
.
ajaxRequestResolver
!=
null
&&
indirectClient
.
getAjaxRequestResolver
()
==
null
)
{
indirectClient
.
setAjaxRequestResolver
(
this
.
ajaxRequestResolver
);
}
}
if
(
this
.
ajaxRequestResolver
!=
null
&&
indirectClient
.
getAjaxRequestResolver
()
==
null
)
{
indirectClient
.
setAjaxRequestResolver
(
this
.
ajaxRequestResolver
);
final
var
baseClient
=
(
BaseClient
)
client
;
if
(!
authorizationGenerators
.
isEmpty
())
{
baseClient
.
addAuthorizationGenerators
(
this
.
authorizationGenerators
);
}
}
final
var
baseClient
=
(
BaseClient
)
client
;
if
(!
authorizationGenerators
.
isEmpty
())
{
baseClient
.
addAuthorizationGenerators
(
this
.
authorizationGenerators
);
}
this
.
oldClientsHash
=
this
.
clients
.
hashCode
();
}
this
.
oldClientsHash
=
this
.
clients
.
hashCode
();
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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