SEC-1132: Move authoritymapping to core as it is actually used in loading authorities for a use, not in making access decisions.
This commit is contained in:
@@ -30,7 +30,7 @@ import org.springframework.security.core.context.SecurityContextHolder;
|
||||
* <p>
|
||||
* Once the request has been authenticated, the <tt>Authentication</tt> will usually be stored in a thread-local
|
||||
* <tt>SecurityContext</tt> managed by the {@link SecurityContextHolder} by the authentication mechanism which is
|
||||
* being used. An explicit authentication can be achieved, without using one of Spring Security's authentication
|
||||
* being used. An explicit authentication can be achieved, without using one of Spring Security's authentication
|
||||
* mechanisms, by creating an <tt>Authentication</tt> instance and using the code:
|
||||
*
|
||||
* <pre>
|
||||
@@ -38,7 +38,7 @@ import org.springframework.security.core.context.SecurityContextHolder;
|
||||
* </pre>
|
||||
* Note that unless the <tt>Authentication</tt> has the <tt>authenticated</tt> property set to <tt>true</tt>, it will
|
||||
* still be authenticated by any security interceptor (for method or web invocations) which encounters it.
|
||||
*
|
||||
* <p>
|
||||
* In most cases, the framework transparently takes care of managing the security context and authentication objects
|
||||
* for you.
|
||||
*
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.springframework.security.access.authoritymapping;
|
||||
package org.springframework.security.core.authoritymapping;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package org.springframework.security.access.authoritymapping;
|
||||
package org.springframework.security.core.authoritymapping;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -144,7 +144,7 @@ public class MapBasedAttributes2GrantedAuthoritiesMapper implements Attributes2G
|
||||
|
||||
/**
|
||||
*
|
||||
* @see org.springframework.security.access.authoritymapping.MappableAttributesRetriever#getMappableAttributes()
|
||||
* @see org.springframework.security.core.authoritymapping.MappableAttributesRetriever#getMappableAttributes()
|
||||
*/
|
||||
public Set<String> getMappableAttributes() {
|
||||
return mappableAttributes;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.springframework.security.access.authoritymapping;
|
||||
package org.springframework.security.core.authoritymapping;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.springframework.security.access.authoritymapping;
|
||||
package org.springframework.security.core.authoritymapping;
|
||||
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.GrantedAuthorityImpl;
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package org.springframework.security.access.authoritymapping;
|
||||
package org.springframework.security.core.authoritymapping;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
@@ -18,7 +18,7 @@ public class SimpleMappableAttributesRetriever implements MappableAttributesRetr
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.security.access.authoritymapping.MappableAttributesRetriever#getMappableAttributes()
|
||||
* @see org.springframework.security.core.authoritymapping.MappableAttributesRetriever#getMappableAttributes()
|
||||
*/
|
||||
public Set<String> getMappableAttributes() {
|
||||
return mappableAttributes;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.springframework.security.access.authoritymapping;
|
||||
package org.springframework.security.core.authoritymapping;
|
||||
|
||||
import java.io.FilterInputStream;
|
||||
import java.io.IOException;
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
package org.springframework.security.access.authoritymapping;
|
||||
package org.springframework.security.core.authoritymapping;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
@@ -11,10 +11,10 @@ import java.util.List;
|
||||
import org.apache.log4j.Level;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.junit.Test;
|
||||
import org.springframework.security.access.authoritymapping.Attributes2GrantedAuthoritiesMapper;
|
||||
import org.springframework.security.access.authoritymapping.MapBasedAttributes2GrantedAuthoritiesMapper;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.GrantedAuthorityImpl;
|
||||
import org.springframework.security.core.authoritymapping.Attributes2GrantedAuthoritiesMapper;
|
||||
import org.springframework.security.core.authoritymapping.MapBasedAttributes2GrantedAuthoritiesMapper;
|
||||
|
||||
/**
|
||||
*
|
||||
+2
-1
@@ -1,9 +1,10 @@
|
||||
package org.springframework.security.access.authoritymapping;
|
||||
package org.springframework.security.core.authoritymapping;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.springframework.security.core.authoritymapping.SimpleMappableAttributesRetriever;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package org.springframework.security.access.authoritymapping;
|
||||
package org.springframework.security.core.authoritymapping;
|
||||
|
||||
import org.springframework.security.access.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package org.springframework.security.access.authoritymapping;
|
||||
package org.springframework.security.core.authoritymapping;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
@@ -7,7 +7,7 @@ import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
|
||||
import org.springframework.security.access.authoritymapping.XmlMappableAttributesRetriever;
|
||||
import org.springframework.security.core.authoritymapping.XmlMappableAttributesRetriever;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
-2
@@ -18,8 +18,6 @@ package org.springframework.security.core.context;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.core.context.SecurityContext;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.core.context.SecurityContextImpl;
|
||||
|
||||
/**
|
||||
|
||||
-1
@@ -20,7 +20,6 @@ import junit.framework.TestCase;
|
||||
|
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.context.SecurityContext;
|
||||
import org.springframework.security.core.context.SecurityContextImpl;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user