Remove some logs
This commit is contained in:
parent
1e946f8609
commit
16ff047f4a
1
pom.xml
1
pom.xml
|
@ -7,7 +7,6 @@
|
|||
<artifactId>dnet45-parent</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<groupId>eu.dnetlib</groupId>
|
||||
<artifactId>dnet-role-management</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>war</packaging>
|
||||
|
|
|
@ -31,19 +31,15 @@ public class AuthoritiesUpdater extends HttpSessionSecurityContextRepository {
|
|||
Map<String, ExpiringSession> map = sessions.
|
||||
findByIndexNameAndIndexValue(FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME, id);
|
||||
if (map != null) {
|
||||
logger.debug(map.values().toArray().length);
|
||||
for (ExpiringSession session : map.values()) {
|
||||
logger.debug(session.getId());
|
||||
if (!session.isExpired()) {
|
||||
SecurityContext securityContext = session.getAttribute(SPRING_SECURITY_CONTEXT_KEY);
|
||||
Authentication authentication = securityContext.getAuthentication();
|
||||
if (authentication instanceof OIDCAuthenticationToken) {
|
||||
OIDCAuthenticationToken authOIDC = (OIDCAuthenticationToken) authentication;
|
||||
logger.debug(authorities);
|
||||
securityContext.setAuthentication(new OIDCAuthenticationToken(authOIDC.getSub(), authOIDC.getIssuer(),
|
||||
authOIDC.getUserInfo(), authorities, authOIDC.getIdToken(),
|
||||
authOIDC.getAccessTokenValue(), authOIDC.getRefreshTokenValue()));
|
||||
logger.debug("Update authorities");
|
||||
session.setAttribute(SPRING_SECURITY_CONTEXT_KEY, securityContext);
|
||||
sessions.save(session);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue