X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.security.jackrabbit%2Fsrc%2Forg%2Fargeo%2Fsecurity%2Fjackrabbit%2FArgeoLoginModule.java;h=a80f2668228acf6bc3a34ab525e282f2e8e0c309;hb=b3b39d5606a0c48d64a804f4aff5459ea3addc31;hp=43c54408390bb619490bfe392be40a4e108eee88;hpb=5ae7bd094c6b8a2f9c0b6b3460b5abe6fe0b7fff;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.security.jackrabbit/src/org/argeo/security/jackrabbit/ArgeoLoginModule.java b/org.argeo.security.jackrabbit/src/org/argeo/security/jackrabbit/ArgeoLoginModule.java index 43c544083..a80f26682 100644 --- a/org.argeo.security.jackrabbit/src/org/argeo/security/jackrabbit/ArgeoLoginModule.java +++ b/org.argeo.security.jackrabbit/src/org/argeo/security/jackrabbit/ArgeoLoginModule.java @@ -33,9 +33,9 @@ import org.apache.jackrabbit.core.security.authentication.AbstractLoginModule; import org.apache.jackrabbit.core.security.authentication.Authentication; import org.apache.jackrabbit.core.security.principal.AdminPrincipal; import org.argeo.security.SystemAuthentication; -import org.springframework.security.GrantedAuthority; -import org.springframework.security.context.SecurityContextHolder; -import org.springframework.security.providers.anonymous.AnonymousAuthenticationToken; +import org.springframework.security.authentication.AnonymousAuthenticationToken; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.context.SecurityContextHolder; /** Jackrabbit login mechanism based on Spring Security */ public class ArgeoLoginModule extends AbstractLoginModule { @@ -46,7 +46,7 @@ public class ArgeoLoginModule extends AbstractLoginModule { public boolean login() throws LoginException { boolean loginOk = super.login(); if (!loginOk) { - org.springframework.security.Authentication authen = (org.springframework.security.Authentication) SecurityContextHolder + org.springframework.security.core.Authentication authen = (org.springframework.security.core.Authentication) SecurityContextHolder .getContext().getAuthentication(); } return loginOk; @@ -57,7 +57,7 @@ public class ArgeoLoginModule extends AbstractLoginModule { public boolean commit() throws LoginException { boolean commitOk = super.commit(); if (!commitOk) { - org.springframework.security.Authentication authen = (org.springframework.security.Authentication) SecurityContextHolder + org.springframework.security.core.Authentication authen = (org.springframework.security.core.Authentication) SecurityContextHolder .getContext().getAuthentication(); } return commitOk; @@ -69,7 +69,7 @@ public class ArgeoLoginModule extends AbstractLoginModule { */ @Override protected Principal getPrincipal(Credentials credentials) { - org.springframework.security.Authentication authen = SecurityContextHolder + org.springframework.security.core.Authentication authen = SecurityContextHolder .getContext().getAuthentication(); return authen; } @@ -86,7 +86,7 @@ public class ArgeoLoginModule extends AbstractLoginModule { protected Set syncPrincipals() { // use linked HashSet instead of HashSet in order to maintain the order // of principals (as in the Subject). - org.springframework.security.Authentication authen = (org.springframework.security.Authentication) principal; + org.springframework.security.core.Authentication authen = (org.springframework.security.core.Authentication) principal; Set principals = new LinkedHashSet(); principals.add(authen); @@ -164,12 +164,12 @@ public class ArgeoLoginModule extends AbstractLoginModule { } return new Authentication() { public boolean canHandle(Credentials credentials) { - return principal instanceof org.springframework.security.Authentication; + return principal instanceof org.springframework.security.core.Authentication; } public boolean authenticate(Credentials credentials) throws RepositoryException { - return ((org.springframework.security.Authentication) principal) + return ((org.springframework.security.core.Authentication) principal) .isAuthenticated(); } };