SEC-1132: Created core and authentication packages within core module.
This commit is contained in:
@@ -17,8 +17,8 @@ package org.springframework.security.access;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.InsufficientAuthenticationException;
|
||||
import org.springframework.security.authentication.InsufficientAuthenticationException;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
/**
|
||||
* Makes a final access control (authorization) decision.
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
|
||||
package org.springframework.security.access;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.SpringSecurityException;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.SpringSecurityException;
|
||||
|
||||
/**
|
||||
* Thrown if an {@link Authentication} object does not hold a required authority.
|
||||
|
||||
@@ -2,10 +2,10 @@ package org.springframework.security.access.annotation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.access.vote.AccessDecisionVoter;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
|
||||
/**
|
||||
* Voter on JSR-250 configuration attributes.
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package org.springframework.security.access.authoritymapping;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
|
||||
/**
|
||||
* Interface to be implemented by classes that can map a list of security attributes (such as roles or
|
||||
|
||||
+2
-2
@@ -10,8 +10,8 @@ import java.util.Set;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.GrantedAuthorityImpl;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package org.springframework.security.access.authoritymapping;
|
||||
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.GrantedAuthorityImpl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.access;
|
||||
package org.springframework.security.access.event;
|
||||
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
|
||||
+3
-2
@@ -13,11 +13,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.access;
|
||||
package org.springframework.security.access.event;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.AuthenticationCredentialsNotFoundException;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.authentication.AuthenticationCredentialsNotFoundException;
|
||||
|
||||
|
||||
/**
|
||||
+5
-2
@@ -13,11 +13,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.access;
|
||||
package org.springframework.security.access.event;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.access.AccessDecisionManager;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
|
||||
/**
|
||||
+3
-2
@@ -13,11 +13,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.access;
|
||||
package org.springframework.security.access.event;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
|
||||
/**
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.access;
|
||||
package org.springframework.security.access.event;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.access;
|
||||
package org.springframework.security.access.event;
|
||||
|
||||
/**
|
||||
* Event that is generated whenever a public secure object is invoked.<p>A public secure object is a secure object
|
||||
+1
-1
@@ -4,7 +4,7 @@ import org.aopalliance.intercept.MethodInvocation;
|
||||
import org.springframework.expression.EvaluationContext;
|
||||
import org.springframework.expression.Expression;
|
||||
import org.springframework.expression.ExpressionParser;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
/**
|
||||
* Facade which isolates Spring Security's requirements for evaluation method-security expressions
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ package org.springframework.security.access.expression;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
/**
|
||||
* Strategy used in expression evaluation to determine whether a user has a permission or permissions
|
||||
|
||||
+1
-1
@@ -7,13 +7,13 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.expression.EvaluationContext;
|
||||
import org.springframework.expression.Expression;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.access.expression.ExpressionUtils;
|
||||
import org.springframework.security.access.expression.MethodSecurityExpressionHandler;
|
||||
import org.springframework.security.access.expression.support.DefaultMethodSecurityExpressionHandler;
|
||||
import org.springframework.security.access.intercept.AfterInvocationProvider;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
/**
|
||||
* AfterInvocationProvider which handles the @PostAuthorize and @PostFilter annotation expressions.
|
||||
|
||||
+1
-1
@@ -8,12 +8,12 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.expression.EvaluationContext;
|
||||
import org.springframework.expression.Expression;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.access.expression.ExpressionUtils;
|
||||
import org.springframework.security.access.expression.MethodSecurityExpressionHandler;
|
||||
import org.springframework.security.access.expression.support.DefaultMethodSecurityExpressionHandler;
|
||||
import org.springframework.security.access.vote.AccessDecisionVoter;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
/**
|
||||
* Voter which performs the actions for @PreFilter and @PostAuthorize annotations.
|
||||
|
||||
+3
-3
@@ -14,12 +14,12 @@ import org.springframework.expression.EvaluationContext;
|
||||
import org.springframework.expression.Expression;
|
||||
import org.springframework.expression.ExpressionParser;
|
||||
import org.springframework.expression.spel.antlr.SpelAntlrExpressionParser;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.AuthenticationTrustResolver;
|
||||
import org.springframework.security.AuthenticationTrustResolverImpl;
|
||||
import org.springframework.security.access.expression.ExpressionUtils;
|
||||
import org.springframework.security.access.expression.MethodSecurityExpressionHandler;
|
||||
import org.springframework.security.access.expression.PermissionEvaluator;
|
||||
import org.springframework.security.authentication.AuthenticationTrustResolver;
|
||||
import org.springframework.security.authentication.AuthenticationTrustResolverImpl;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
/**
|
||||
* The standard implementation of <tt>SecurityExpressionHandler</tt>.
|
||||
|
||||
+1
-1
@@ -4,8 +4,8 @@ import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.access.expression.PermissionEvaluator;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
/**
|
||||
* A null PermissionEvaluator which denies all access. Used by default for situations when permission
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import org.aopalliance.intercept.MethodInvocation;
|
||||
import org.springframework.core.LocalVariableTableParameterNameDiscoverer;
|
||||
import org.springframework.core.ParameterNameDiscoverer;
|
||||
import org.springframework.expression.spel.support.StandardEvaluationContext;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -2,8 +2,8 @@ package org.springframework.security.access.expression.support;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.access.expression.PermissionEvaluator;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
+4
-4
@@ -2,10 +2,10 @@ package org.springframework.security.access.expression.support;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.AuthenticationTrustResolver;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.util.AuthorityUtils;
|
||||
import org.springframework.security.authentication.AuthenticationTrustResolver;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthorityUtils;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ package org.springframework.security.access.hierarchicalroles;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
|
||||
/**
|
||||
* The simple interface of a role hierarchy.
|
||||
|
||||
+2
-2
@@ -15,8 +15,8 @@
|
||||
package org.springframework.security.access.hierarchicalroles;
|
||||
|
||||
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.GrantedAuthorityImpl;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ package org.springframework.security.access.hierarchicalroles;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.userdetails.UserDetails;
|
||||
|
||||
/**
|
||||
|
||||
+11
-11
@@ -29,18 +29,18 @@ import org.springframework.context.ApplicationEventPublisherAware;
|
||||
import org.springframework.context.MessageSource;
|
||||
import org.springframework.context.MessageSourceAware;
|
||||
import org.springframework.context.support.MessageSourceAccessor;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.AuthenticationCredentialsNotFoundException;
|
||||
import org.springframework.security.AuthenticationManager;
|
||||
import org.springframework.security.SpringSecurityMessageSource;
|
||||
import org.springframework.security.access.AccessDecisionManager;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.springframework.security.access.AuthenticationCredentialsNotFoundEvent;
|
||||
import org.springframework.security.access.AuthorizationFailureEvent;
|
||||
import org.springframework.security.access.AuthorizedEvent;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.access.PublicInvocationEvent;
|
||||
import org.springframework.security.context.SecurityContextHolder;
|
||||
import org.springframework.security.access.event.AuthenticationCredentialsNotFoundEvent;
|
||||
import org.springframework.security.access.event.AuthorizationFailureEvent;
|
||||
import org.springframework.security.access.event.AuthorizedEvent;
|
||||
import org.springframework.security.access.event.PublicInvocationEvent;
|
||||
import org.springframework.security.authentication.AuthenticationCredentialsNotFoundException;
|
||||
import org.springframework.security.authentication.AuthenticationManager;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.SpringSecurityMessageSource;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
@@ -55,7 +55,7 @@ import org.springframework.util.Assert;
|
||||
* <li>For an invocation that is secured (there is a list of <code>ConfigAttribute</code>s for the secure
|
||||
* object invocation):
|
||||
* <ol type="a">
|
||||
* <li>If either the {@link org.springframework.security.Authentication#isAuthenticated()}
|
||||
* <li>If either the {@link org.springframework.security.core.Authentication#isAuthenticated()}
|
||||
* returns <code>false</code>, or the {@link #alwaysReauthenticate} is
|
||||
* <code>true</code>, authenticate the request against the configured {@link AuthenticationManager}.
|
||||
* When authenticated, replace the <code>Authentication</code> object on the
|
||||
@@ -282,7 +282,7 @@ public abstract class AbstractSecurityInterceptor implements InitializingBean, A
|
||||
|
||||
/**
|
||||
* Checks the current authentication token and passes it to the AuthenticationManager if
|
||||
* {@link org.springframework.security.Authentication#isAuthenticated()} returns false or the property
|
||||
* {@link org.springframework.security.core.Authentication#isAuthenticated()} returns false or the property
|
||||
* <tt>alwaysReauthenticate</tt> has been set to true.
|
||||
*
|
||||
* @return an authenticated <tt>Authentication</tt> object.
|
||||
|
||||
+1
-1
@@ -17,9 +17,9 @@ package org.springframework.security.access.intercept;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
/**
|
||||
* Reviews the <code>Object</code> returned from a secure object invocation,
|
||||
|
||||
+1
-1
@@ -17,9 +17,9 @@ package org.springframework.security.access.intercept;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -21,9 +21,9 @@ import java.util.List;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -17,8 +17,8 @@ package org.springframework.security.access.intercept;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -17,8 +17,8 @@ package org.springframework.security.access.intercept;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
+5
-5
@@ -15,12 +15,12 @@
|
||||
|
||||
package org.springframework.security.access.intercept;
|
||||
|
||||
import org.springframework.security.SpringSecurityMessageSource;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.AuthenticationException;
|
||||
import org.springframework.security.BadCredentialsException;
|
||||
|
||||
import org.springframework.security.providers.AuthenticationProvider;
|
||||
import org.springframework.security.authentication.AuthenticationProvider;
|
||||
import org.springframework.security.authentication.BadCredentialsException;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.core.SpringSecurityMessageSource;
|
||||
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ package org.springframework.security.access.intercept;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
/**
|
||||
* Creates a new temporary {@link Authentication} object for the current secure
|
||||
@@ -30,7 +30,7 @@ import org.springframework.security.access.ConfigAttribute;
|
||||
* object invocation only. The {@link
|
||||
* org.springframework.security.access.intercept.AbstractSecurityInterceptor} will replace
|
||||
* the <code>Authentication</code> object held in the
|
||||
* {@link org.springframework.security.context.SecurityContext SecurityContext}
|
||||
* {@link org.springframework.security.core.context.SecurityContext SecurityContext}
|
||||
* for the duration of the secure object callback only, returning it to
|
||||
* the original <code>Authentication</code> object when the callback ends.
|
||||
* </p>
|
||||
|
||||
+3
-3
@@ -19,10 +19,10 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.GrantedAuthorityImpl;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
|
||||
|
||||
+4
-4
@@ -18,14 +18,14 @@ package org.springframework.security.access.intercept;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
|
||||
import org.springframework.security.providers.AbstractAuthenticationToken;
|
||||
import org.springframework.security.authentication.AbstractAuthenticationToken;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
|
||||
|
||||
/**
|
||||
* An immutable {@link org.springframework.security.Authentication} implementation that supports {@link RunAsManagerImpl}.
|
||||
* An immutable {@link org.springframework.security.core.Authentication} implementation that supports {@link RunAsManagerImpl}.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
|
||||
+1
-1
@@ -21,10 +21,10 @@ import org.aopalliance.intercept.MethodInvocation;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.access.intercept.AbstractSecurityInterceptor;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -20,10 +20,10 @@ import java.util.List;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.security.SpringSecurityMessageSource;
|
||||
import org.springframework.security.access.AccessDecisionManager;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.core.SpringSecurityMessageSource;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.context.MessageSource;
|
||||
import org.springframework.context.MessageSourceAware;
|
||||
|
||||
+1
-1
@@ -17,8 +17,8 @@ package org.springframework.security.access.vote;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,9 +17,9 @@ package org.springframework.security.access.vote;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,10 +17,10 @@ package org.springframework.security.access.vote;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.AuthenticationTrustResolver;
|
||||
import org.springframework.security.AuthenticationTrustResolverImpl;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.authentication.AuthenticationTrustResolver;
|
||||
import org.springframework.security.authentication.AuthenticationTrustResolverImpl;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ import org.springframework.util.Assert;
|
||||
* <p>
|
||||
* The current <code>Authentication</code> will be inspected to determine if the principal has a particular
|
||||
* level of authentication. The "FULLY" authenticated option means the user is authenticated fully (i.e. {@link
|
||||
* org.springframework.security.AuthenticationTrustResolver#isAnonymous(Authentication)} is false and {@link
|
||||
* org.springframework.security.AuthenticationTrustResolver#isRememberMe(Authentication)} is false). The "REMEMBERED" will grant
|
||||
* org.springframework.security.authentication.AuthenticationTrustResolver#isAnonymous(Authentication)} is false and {@link
|
||||
* org.springframework.security.authentication.AuthenticationTrustResolver#isRememberMe(Authentication)} is false). The "REMEMBERED" will grant
|
||||
* access if the principal was either authenticated via remember-me OR is fully authenticated. The "ANONYMOUSLY" will
|
||||
* grant access if the principal was authenticated via remember-me, OR anonymously, OR via full authentication.
|
||||
* <p>
|
||||
|
||||
@@ -17,9 +17,9 @@ package org.springframework.security.access.vote;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
/**
|
||||
* Simple concrete implementation of {@link org.springframework.security.access.AccessDecisionManager} that uses a
|
||||
|
||||
@@ -21,8 +21,8 @@ import java.util.Map;
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@ package org.springframework.security.access.vote;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.access.hierarchicalroles.RoleHierarchy;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,9 +17,9 @@ package org.springframework.security.access.vote;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
|
||||
/**
|
||||
* Votes if any {@link ConfigAttribute#getAttribute()} starts with a prefix
|
||||
@@ -30,7 +30,7 @@ import org.springframework.security.access.ConfigAttribute;
|
||||
* <p>
|
||||
* Abstains from voting if no configuration attribute commences with the role
|
||||
* prefix. Votes to grant access if there is an exact matching
|
||||
* {@link org.springframework.security.GrantedAuthority} to a <code>ConfigAttribute</code>
|
||||
* {@link org.springframework.security.core.GrantedAuthority} to a <code>ConfigAttribute</code>
|
||||
* starting with the role prefix. Votes to deny access if there is no exact
|
||||
* matching <code>GrantedAuthority</code> to a <code>ConfigAttribute</code>
|
||||
* starting with the role prefix.
|
||||
|
||||
@@ -18,9 +18,9 @@ package org.springframework.security.access.vote;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
+5
-2
@@ -13,7 +13,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
|
||||
/**
|
||||
* An abstract implementation of the {@link AuthenticationManager}.
|
||||
@@ -74,7 +77,7 @@ public abstract class AbstractAuthenticationManager implements AuthenticationMan
|
||||
* before rethrowing it. This is useful for use with remoting protocols where the information shouldn't
|
||||
* be serialized to the client. Defaults to 'false'.
|
||||
*
|
||||
* @see org.springframework.security.AuthenticationException#getExtraInformation()
|
||||
* @see org.springframework.security.core.AuthenticationException#getExtraInformation()
|
||||
*/
|
||||
public void setClearExtraInformation(boolean clearExtraInformation) {
|
||||
this.clearExtraInformation = clearExtraInformation;
|
||||
+3
-3
@@ -13,14 +13,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.providers;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import java.security.Principal;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.userdetails.UserDetails;
|
||||
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
/**
|
||||
* Thrown if an authentication request is rejected because the account has expired. Makes no assertion as to
|
||||
+3
-1
@@ -1,4 +1,6 @@
|
||||
package org.springframework.security;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
|
||||
/**
|
||||
* Base class for authentication exceptions which are caused by a particular
|
||||
+2
-6
@@ -1,12 +1,8 @@
|
||||
package org.springframework.security.providers;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import org.springframework.security.core.SpringSecurityMessageSource;
|
||||
import org.springframework.security.userdetails.UserDetailsChecker;
|
||||
import org.springframework.security.userdetails.UserDetails;
|
||||
import org.springframework.security.LockedException;
|
||||
import org.springframework.security.DisabledException;
|
||||
import org.springframework.security.AccountExpiredException;
|
||||
import org.springframework.security.CredentialsExpiredException;
|
||||
import org.springframework.security.SpringSecurityMessageSource;
|
||||
import org.springframework.context.support.MessageSourceAccessor;
|
||||
|
||||
/**
|
||||
+4
-5
@@ -13,16 +13,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.providers;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.context.MessageSource;
|
||||
import org.springframework.context.MessageSourceAware;
|
||||
import org.springframework.context.support.MessageSourceAccessor;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.AuthenticationException;
|
||||
import org.springframework.security.BadCredentialsException;
|
||||
import org.springframework.security.SpringSecurityMessageSource;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.core.SpringSecurityMessageSource;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
|
||||
+2
-2
@@ -13,9 +13,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.providers;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
+7
-4
@@ -13,11 +13,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
|
||||
/**
|
||||
* Thrown if an authentication request is rejected because there is no {@link Authentication} object in the {@link
|
||||
* org.springframework.security.context.SecurityContext SecurityContext}.
|
||||
* org.springframework.security.core.context.SecurityContext SecurityContext}.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
@@ -25,7 +28,7 @@ package org.springframework.security;
|
||||
public class AuthenticationCredentialsNotFoundException extends AuthenticationException {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
/**
|
||||
/**
|
||||
* Constructs an <code>AuthenticationCredentialsNotFoundException</code>
|
||||
* with the specified message.
|
||||
*
|
||||
@@ -35,7 +38,7 @@ public class AuthenticationCredentialsNotFoundException extends AuthenticationEx
|
||||
super(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Constructs an <code>AuthenticationCredentialsNotFoundException</code>
|
||||
* with the specified message and root cause.
|
||||
*
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.springframework.security;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
+4
-2
@@ -13,12 +13,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Provides a {@link org.springframework.security.Authentication#getDetails()} object for
|
||||
* Provides a {@link org.springframework.security.core.Authentication#getDetails()} object for
|
||||
* a given web request.
|
||||
*
|
||||
* @author Ben Alex
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package org.springframework.security;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
|
||||
import org.springframework.security.AuthenticationDetailsSource;
|
||||
import org.springframework.security.authentication.AuthenticationDetailsSource;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
|
||||
+4
-1
@@ -13,7 +13,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
|
||||
/**
|
||||
* Processes an {@link Authentication} request.
|
||||
+5
-5
@@ -13,15 +13,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.providers;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.AuthenticationException;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
|
||||
|
||||
/**
|
||||
* Indicates a class can process a specific {@link
|
||||
* org.springframework.security.Authentication} implementation.
|
||||
* org.springframework.security.core.Authentication} implementation.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
@@ -31,7 +31,7 @@ public interface AuthenticationProvider {
|
||||
|
||||
/**
|
||||
* Performs authentication with the same contract as {@link
|
||||
* org.springframework.security.AuthenticationManager#authenticate(Authentication)}.
|
||||
* org.springframework.security.authentication.AuthenticationManager#authenticate(Authentication)}.
|
||||
*
|
||||
* @param authentication the authentication request object.
|
||||
*
|
||||
+3
-1
@@ -13,7 +13,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
|
||||
/**
|
||||
* Thrown if an authentication request could not be processed due to a system problem.<p>This might be thrown if a
|
||||
+3
-1
@@ -13,7 +13,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
/**
|
||||
* Evaluates <code>Authentication</code> tokens
|
||||
+2
-3
@@ -13,10 +13,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import org.springframework.security.providers.AnonymousAuthenticationToken;
|
||||
import org.springframework.security.providers.RememberMeAuthenticationToken;
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
|
||||
/**
|
||||
+3
-1
@@ -13,7 +13,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
|
||||
/**
|
||||
* Thrown if an authentication request is rejected because the credentials are invalid. For this exception to be
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
/**
|
||||
* Thrown if an authentication request is rejected because the account's credentials have expired. Makes no
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
/**
|
||||
* Thrown if an authentication request is rejected because the account is disabled. Makes no assertion as to
|
||||
+13
-8
@@ -13,14 +13,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
|
||||
|
||||
/**
|
||||
* Thrown if an authentication request is rejected because the credentials are not sufficiently trusted.<p>{{@link
|
||||
* org.springframework.security.access.vote.AccessDecisionVoter}s will typically throw this exception if they are dissatisfied with the
|
||||
* level of the authentication, such as if performed using a remember-me mechanism or anonymously. The commonly used
|
||||
* {@link org.springframework.security.ui.ExceptionTranslationFilter} will thus cause the <code>AuthenticationEntryPoint</code>
|
||||
* to be called, allowing the principal to authenticate with a stronger level of authentication.}</p>
|
||||
* Thrown if an authentication request is rejected because the credentials are not sufficiently trusted.
|
||||
* <p>
|
||||
* {@link org.springframework.security.access.vote.AccessDecisionVoter}s will typically throw this exception if
|
||||
* they are dissatisfied with the level of the authentication, such as if performed using a remember-me mechanism or
|
||||
* anonymously. The commonly used {@link org.springframework.security.web.ExceptionTranslationFilter} will thus cause
|
||||
* the <code>AuthenticationEntryPoint</code> to be called, allowing the principal to authenticate with a stronger
|
||||
* level of authentication.</p>
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
@@ -28,7 +33,7 @@ package org.springframework.security;
|
||||
public class InsufficientAuthenticationException extends AuthenticationException {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
/**
|
||||
/**
|
||||
* Constructs an <code>InsufficientAuthenticationException</code> with the
|
||||
* specified message.
|
||||
*
|
||||
@@ -38,7 +43,7 @@ public class InsufficientAuthenticationException extends AuthenticationException
|
||||
super(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Constructs an <code>InsufficientAuthenticationException</code> with the
|
||||
* specified message and root cause.
|
||||
*
|
||||
+2
-1
@@ -13,7 +13,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
|
||||
/**
|
||||
* Thrown if an authentication request is rejected because the account is locked. Makes no assertion as to whether
|
||||
+21
-29
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.providers;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
@@ -29,31 +29,23 @@ import org.springframework.context.ApplicationEventPublisherAware;
|
||||
import org.springframework.context.MessageSource;
|
||||
import org.springframework.context.MessageSourceAware;
|
||||
import org.springframework.context.support.MessageSourceAccessor;
|
||||
import org.springframework.security.AbstractAuthenticationManager;
|
||||
import org.springframework.security.AccountExpiredException;
|
||||
import org.springframework.security.AccountStatusException;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.AuthenticationException;
|
||||
import org.springframework.security.AuthenticationServiceException;
|
||||
import org.springframework.security.BadCredentialsException;
|
||||
import org.springframework.security.CredentialsExpiredException;
|
||||
import org.springframework.security.DisabledException;
|
||||
import org.springframework.security.LockedException;
|
||||
import org.springframework.security.SpringSecurityMessageSource;
|
||||
import org.springframework.security.concurrent.ConcurrentLoginException;
|
||||
import org.springframework.security.concurrent.ConcurrentSessionController;
|
||||
import org.springframework.security.concurrent.NullConcurrentSessionController;
|
||||
import org.springframework.security.event.authentication.AbstractAuthenticationEvent;
|
||||
import org.springframework.security.event.authentication.AuthenticationFailureBadCredentialsEvent;
|
||||
import org.springframework.security.event.authentication.AuthenticationFailureConcurrentLoginEvent;
|
||||
import org.springframework.security.event.authentication.AuthenticationFailureCredentialsExpiredEvent;
|
||||
import org.springframework.security.event.authentication.AuthenticationFailureDisabledEvent;
|
||||
import org.springframework.security.event.authentication.AuthenticationFailureExpiredEvent;
|
||||
import org.springframework.security.event.authentication.AuthenticationFailureLockedEvent;
|
||||
import org.springframework.security.event.authentication.AuthenticationFailureProviderNotFoundEvent;
|
||||
import org.springframework.security.event.authentication.AuthenticationFailureProxyUntrustedEvent;
|
||||
import org.springframework.security.event.authentication.AuthenticationFailureServiceExceptionEvent;
|
||||
import org.springframework.security.event.authentication.AuthenticationSuccessEvent;
|
||||
import org.springframework.security.authentication.concurrent.ConcurrentLoginException;
|
||||
import org.springframework.security.authentication.concurrent.ConcurrentSessionController;
|
||||
import org.springframework.security.authentication.concurrent.NullConcurrentSessionController;
|
||||
import org.springframework.security.authentication.event.AbstractAuthenticationEvent;
|
||||
import org.springframework.security.authentication.event.AuthenticationFailureBadCredentialsEvent;
|
||||
import org.springframework.security.authentication.event.AuthenticationFailureConcurrentLoginEvent;
|
||||
import org.springframework.security.authentication.event.AuthenticationFailureCredentialsExpiredEvent;
|
||||
import org.springframework.security.authentication.event.AuthenticationFailureDisabledEvent;
|
||||
import org.springframework.security.authentication.event.AuthenticationFailureExpiredEvent;
|
||||
import org.springframework.security.authentication.event.AuthenticationFailureLockedEvent;
|
||||
import org.springframework.security.authentication.event.AuthenticationFailureProviderNotFoundEvent;
|
||||
import org.springframework.security.authentication.event.AuthenticationFailureProxyUntrustedEvent;
|
||||
import org.springframework.security.authentication.event.AuthenticationFailureServiceExceptionEvent;
|
||||
import org.springframework.security.authentication.event.AuthenticationSuccessEvent;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.core.SpringSecurityMessageSource;
|
||||
import org.springframework.security.userdetails.UsernameNotFoundException;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
@@ -80,13 +72,13 @@ import org.springframework.util.Assert;
|
||||
* <p>
|
||||
* If a valid <code>Authentication</code> is returned by an <code>AuthenticationProvider</code>, the
|
||||
* <code>ProviderManager</code> will publish an
|
||||
* {@link org.springframework.security.event.authentication.AuthenticationSuccessEvent}. If an
|
||||
* {@link org.springframework.security.authentication.event.AuthenticationSuccessEvent}. If an
|
||||
* <code>AuthenticationException</code> is detected, the final <code>AuthenticationException</code> thrown will be
|
||||
* used to publish an appropriate failure event. By default <code>ProviderManager</code> maps common exceptions to
|
||||
* events, but this can be fine-tuned by providing a new <code>exceptionMappings</code><code>java.util.Properties</code>
|
||||
* object. In the properties object, each of the keys represent the fully qualified classname of the exception, and
|
||||
* each of the values represent the name of an event class which subclasses
|
||||
* {@link org.springframework.security.event.authentication.AbstractAuthenticationFailureEvent}
|
||||
* {@link org.springframework.security.authentication.event.AbstractAuthenticationFailureEvent}
|
||||
* and provides its constructor.
|
||||
*
|
||||
*
|
||||
@@ -129,7 +121,7 @@ public class ProviderManager extends AbstractAuthenticationManager implements In
|
||||
AuthenticationFailureConcurrentLoginEvent.class.getName());
|
||||
DEFAULT_EXCEPTION_MAPPINGS.put(ProviderNotFoundException.class.getName(),
|
||||
AuthenticationFailureProviderNotFoundEvent.class.getName());
|
||||
DEFAULT_EXCEPTION_MAPPINGS.put("org.springframework.security.providers.cas.ProxyUntrustedException",
|
||||
DEFAULT_EXCEPTION_MAPPINGS.put("org.springframework.security.authentication.cas.ProxyUntrustedException",
|
||||
AuthenticationFailureProxyUntrustedEvent.class.getName());
|
||||
}
|
||||
|
||||
+4
-3
@@ -13,14 +13,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.providers;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
|
||||
import org.springframework.security.AuthenticationException;
|
||||
|
||||
|
||||
/**
|
||||
* Thrown by {@link ProviderManager} if no {@link AuthenticationProvider} could be found that supports the
|
||||
* presented {@link org.springframework.security.Authentication} object.
|
||||
* presented {@link org.springframework.security.core.Authentication} object.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
+4
-5
@@ -13,16 +13,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.providers;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.context.MessageSource;
|
||||
import org.springframework.context.MessageSourceAware;
|
||||
import org.springframework.context.support.MessageSourceAccessor;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.AuthenticationException;
|
||||
import org.springframework.security.BadCredentialsException;
|
||||
import org.springframework.security.SpringSecurityMessageSource;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.core.SpringSecurityMessageSource;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
|
||||
+2
-2
@@ -13,13 +13,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.providers;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
|
||||
|
||||
/**
|
||||
+3
-3
@@ -13,10 +13,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.providers;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.AuthenticationException;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
|
||||
|
||||
/**
|
||||
+4
-4
@@ -13,17 +13,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.providers;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.util.AuthorityUtils;
|
||||
import org.springframework.security.core.AuthorityUtils;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
|
||||
|
||||
/**
|
||||
* An {@link org.springframework.security.Authentication} implementation that is designed for use whilst unit testing.
|
||||
* An {@link org.springframework.security.core.Authentication} implementation that is designed for use whilst unit testing.
|
||||
* <p>
|
||||
* The corresponding authentication provider is {@link TestingAuthenticationProvider}.
|
||||
*
|
||||
+3
-3
@@ -13,16 +13,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.providers;
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
|
||||
|
||||
/**
|
||||
* An {@link org.springframework.security.Authentication} implementation that is designed for simple presentation of a
|
||||
* An {@link org.springframework.security.core.Authentication} implementation that is designed for simple presentation of a
|
||||
* username and password.
|
||||
* <p>
|
||||
* The <code>principal</code> and <code>credentials</code> should be set with an <code>Object</code> that provides
|
||||
+2
-2
@@ -13,9 +13,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.concurrent;
|
||||
package org.springframework.security.authentication.concurrent;
|
||||
|
||||
import org.springframework.security.AuthenticationException;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
|
||||
|
||||
/**
|
||||
+4
-4
@@ -13,15 +13,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.concurrent;
|
||||
package org.springframework.security.authentication.concurrent;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.AuthenticationException;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
|
||||
|
||||
/**
|
||||
* Provides two methods that can be called by an {@link
|
||||
* org.springframework.security.AuthenticationManager} to integrate with the
|
||||
* org.springframework.security.authentication.AuthenticationManager} to integrate with the
|
||||
* concurrent session handling infrastructure.
|
||||
*
|
||||
* @author Ben Alex
|
||||
+4
-4
@@ -13,11 +13,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.concurrent;
|
||||
package org.springframework.security.authentication.concurrent;
|
||||
|
||||
import org.springframework.security.SpringSecurityMessageSource;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.AuthenticationException;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.core.SpringSecurityMessageSource;
|
||||
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
|
||||
+4
-4
@@ -13,14 +13,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.concurrent;
|
||||
package org.springframework.security.authentication.concurrent;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.AuthenticationException;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
|
||||
|
||||
/**
|
||||
* No-op implementation of {@link org.springframework.security.concurrent.ConcurrentSessionController}.
|
||||
* No-op implementation of {@link org.springframework.security.authentication.concurrent.ConcurrentSessionController}.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
+2
-2
@@ -13,9 +13,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.concurrent;
|
||||
package org.springframework.security.authentication.concurrent;
|
||||
|
||||
import org.springframework.security.AuthenticationException;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
|
||||
|
||||
/**
|
||||
+3
-3
@@ -13,15 +13,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.concurrent;
|
||||
package org.springframework.security.authentication.concurrent;
|
||||
|
||||
/**
|
||||
* Implemented by {@link org.springframework.security.Authentication#getDetails()}
|
||||
* Implemented by {@link org.springframework.security.core.Authentication#getDetails()}
|
||||
* implementations that are capable of returning a session ID.
|
||||
*
|
||||
* <p>
|
||||
* This interface is used by {@link
|
||||
* org.springframework.security.concurrent.SessionRegistryUtils} to extract the session
|
||||
* org.springframework.security.authentication.concurrent.SessionRegistryUtils} to extract the session
|
||||
* ID from an <code>Authentication</code> object. In turn,
|
||||
* <code>SessionRegistryUtils</code> is used by {@link
|
||||
* ConcurrentSessionControllerImpl}. If not using this latter implementation,
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.concurrent;
|
||||
package org.springframework.security.authentication.concurrent;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.concurrent;
|
||||
package org.springframework.security.authentication.concurrent;
|
||||
|
||||
/**
|
||||
* Maintains a registry of <code>SessionInformation</code> instances.
|
||||
+2
-2
@@ -13,10 +13,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.concurrent;
|
||||
package org.springframework.security.authentication.concurrent;
|
||||
|
||||
import org.springframework.security.Authentication;
|
||||
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.userdetails.UserDetails;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
+11
-11
@@ -13,19 +13,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.providers.dao;
|
||||
package org.springframework.security.authentication.dao;
|
||||
|
||||
import org.springframework.security.AccountExpiredException;
|
||||
import org.springframework.security.SpringSecurityMessageSource;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.AuthenticationException;
|
||||
import org.springframework.security.BadCredentialsException;
|
||||
import org.springframework.security.CredentialsExpiredException;
|
||||
import org.springframework.security.DisabledException;
|
||||
import org.springframework.security.LockedException;
|
||||
|
||||
import org.springframework.security.providers.AuthenticationProvider;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.authentication.AccountExpiredException;
|
||||
import org.springframework.security.authentication.AuthenticationProvider;
|
||||
import org.springframework.security.authentication.BadCredentialsException;
|
||||
import org.springframework.security.authentication.CredentialsExpiredException;
|
||||
import org.springframework.security.authentication.DisabledException;
|
||||
import org.springframework.security.authentication.LockedException;
|
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.core.SpringSecurityMessageSource;
|
||||
|
||||
import org.springframework.security.userdetails.UserCache;
|
||||
import org.springframework.security.userdetails.UserDetails;
|
||||
+9
-9
@@ -13,15 +13,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.providers.dao;
|
||||
package org.springframework.security.authentication.dao;
|
||||
|
||||
import org.springframework.security.AuthenticationException;
|
||||
import org.springframework.security.AuthenticationServiceException;
|
||||
import org.springframework.security.BadCredentialsException;
|
||||
import org.springframework.security.providers.AuthenticationProvider;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.providers.encoding.PasswordEncoder;
|
||||
import org.springframework.security.providers.encoding.PlaintextPasswordEncoder;
|
||||
import org.springframework.security.authentication.AuthenticationProvider;
|
||||
import org.springframework.security.authentication.AuthenticationServiceException;
|
||||
import org.springframework.security.authentication.BadCredentialsException;
|
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.authentication.encoding.PasswordEncoder;
|
||||
import org.springframework.security.authentication.encoding.PlaintextPasswordEncoder;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.userdetails.UserDetails;
|
||||
import org.springframework.security.userdetails.UserDetailsService;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
@@ -139,7 +139,7 @@ public class DaoAuthenticationProvider extends AbstractUserDetailsAuthentication
|
||||
* thrown BadCredentialsException. Defaults to true, but can be set to false if the exception will be
|
||||
* used with a remoting protocol, for example.
|
||||
*
|
||||
* @deprecated use {@link org.springframework.security.providers.ProviderManager#setClearExtraInformation(boolean)}
|
||||
* @deprecated use {@link org.springframework.security.authentication.ProviderManager#setClearExtraInformation(boolean)}
|
||||
*/
|
||||
public void setIncludeDetailsObject(boolean includeDetailsObject) {
|
||||
this.includeDetailsObject = includeDetailsObject;
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.providers.dao;
|
||||
package org.springframework.security.authentication.dao;
|
||||
|
||||
import org.springframework.security.userdetails.UserDetails;
|
||||
|
||||
+3
-3
@@ -13,11 +13,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.providers.dao.salt;
|
||||
package org.springframework.security.authentication.dao.salt;
|
||||
|
||||
import org.springframework.security.AuthenticationServiceException;
|
||||
|
||||
import org.springframework.security.providers.dao.SaltSource;
|
||||
import org.springframework.security.authentication.AuthenticationServiceException;
|
||||
import org.springframework.security.authentication.dao.SaltSource;
|
||||
|
||||
import org.springframework.security.userdetails.UserDetails;
|
||||
|
||||
+2
-2
@@ -13,9 +13,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.providers.dao.salt;
|
||||
package org.springframework.security.authentication.dao.salt;
|
||||
|
||||
import org.springframework.security.providers.dao.SaltSource;
|
||||
import org.springframework.security.authentication.dao.SaltSource;
|
||||
|
||||
import org.springframework.security.userdetails.UserDetails;
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.providers.encoding;
|
||||
package org.springframework.security.authentication.encoding;
|
||||
|
||||
/**
|
||||
* <p>Convenience base for digest password encoders.</p>
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.providers.encoding;
|
||||
package org.springframework.security.authentication.encoding;
|
||||
|
||||
/**
|
||||
* <p>Convenience base for all password encoders.</p>
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.providers.encoding;
|
||||
package org.springframework.security.authentication.encoding;
|
||||
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.security.providers.encoding;
|
||||
package org.springframework.security.authentication.encoding;
|
||||
|
||||
/**
|
||||
* Implementation of the MD4 message digest derived from the RSA Data Security, Inc, MD4 Message-Digest Algorithm.
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.security.providers.encoding;
|
||||
package org.springframework.security.authentication.encoding;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.security.providers.encoding;
|
||||
package org.springframework.security.authentication.encoding;
|
||||
|
||||
/**
|
||||
* <p>MD5 implementation of PasswordEncoder.</p>
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package org.springframework.security.providers.encoding;
|
||||
package org.springframework.security.authentication.encoding;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.apache.commons.codec.binary.Hex;
|
||||
@@ -22,7 +22,7 @@ import java.security.NoSuchAlgorithmException;
|
||||
* <p>
|
||||
* This PasswordEncoder can be used directly as in the following example:<br/>
|
||||
* <pre>
|
||||
* <bean id="passwordEncoder" class="org.springframework.security.providers.encoding.MessageDigestPasswordEncoder">
|
||||
* <bean id="passwordEncoder" class="org.springframework.security.authentication.encoding.MessageDigestPasswordEncoder">
|
||||
* <constructor-arg value="MD5"/>
|
||||
* </bean>
|
||||
* </pre>
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.providers.encoding;
|
||||
package org.springframework.security.authentication.encoding;
|
||||
|
||||
import org.springframework.dao.DataAccessException;
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.providers.encoding;
|
||||
package org.springframework.security.authentication.encoding;
|
||||
|
||||
/**
|
||||
* <p>Plaintext implementation of PasswordEncoder.</p>
|
||||
+2
-2
@@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.security.providers.encoding;
|
||||
package org.springframework.security.authentication.encoding;
|
||||
|
||||
/**
|
||||
* <p>SHA implementation of PasswordEncoder.</p>
|
||||
@@ -25,7 +25,7 @@ package org.springframework.security.providers.encoding;
|
||||
* <p>
|
||||
* The applicationContext example...
|
||||
* <pre>
|
||||
* <bean id="passwordEncoder" class="org.springframework.security.providers.encoding.ShaPasswordEncoder">
|
||||
* <bean id="passwordEncoder" class="org.springframework.security.authentication.encoding.ShaPasswordEncoder">
|
||||
* <constructor-arg value="256"/>
|
||||
* </bean>
|
||||
* </pre>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user