X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.security.core%2Fsrc%2Forg%2Fargeo%2Fsecurity%2Fjcr%2FOsJcrAuthenticationProvider.java;h=7125604c78116a7e0a3ba98b040616d43c5271e4;hb=98abc6870c7a7da1fc099fde347f160b92634fd7;hp=aa95e322d21ef8e8bfa6c05099e1f6d7b426a06b;hpb=10ed6557c631d5feee8541badd0c9f16a9e791c6;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.security.core/src/org/argeo/security/jcr/OsJcrAuthenticationProvider.java b/org.argeo.security.core/src/org/argeo/security/jcr/OsJcrAuthenticationProvider.java index aa95e322d..7125604c7 100644 --- a/org.argeo.security.core/src/org/argeo/security/jcr/OsJcrAuthenticationProvider.java +++ b/org.argeo.security.core/src/org/argeo/security/jcr/OsJcrAuthenticationProvider.java @@ -15,6 +15,8 @@ */ package org.argeo.security.jcr; +import java.util.Collection; + import javax.jcr.Node; import javax.jcr.Repository; import javax.jcr.RepositoryException; @@ -25,12 +27,12 @@ import org.argeo.jcr.JcrUtils; import org.argeo.security.OsAuthenticationToken; import org.argeo.security.SecurityUtils; import org.argeo.security.core.OsAuthenticationProvider; -import org.springframework.security.Authentication; -import org.springframework.security.AuthenticationException; -import org.springframework.security.BadCredentialsException; -import org.springframework.security.GrantedAuthority; -import org.springframework.security.providers.UsernamePasswordAuthenticationToken; -import org.springframework.security.userdetails.UserDetails; +import org.springframework.security.authentication.BadCredentialsException; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.userdetails.UserDetails; /** Relies on OS to authenticate and additionally setup JCR */ public class OsJcrAuthenticationProvider extends OsAuthenticationProvider { @@ -76,7 +78,7 @@ public class OsJcrAuthenticationProvider extends OsAuthenticationProvider { try { // WARNING: at this stage we assume that the java properties // will have the same value - GrantedAuthority[] authorities = getBaseAuthorities(); + Collection authorities = getBaseAuthorities(); String username = JVM_OSUSER; Node userProfile = jcrSecurityModel.sync(nodeSession, username, SecurityUtils.authoritiesToStringList(authorities));