Removing $Id$ markers and stripping trailing whitespace from the codebase.
This commit is contained in:
@@ -24,7 +24,6 @@ import org.springframework.security.core.Authentication;
|
||||
* Makes a final access control (authorization) decision.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public interface AccessDecisionManager {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
@@ -30,7 +30,6 @@ import org.springframework.security.core.Authentication;
|
||||
* </p>
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public interface AccessDecisionVoter {
|
||||
//~ Static fields/initializers =====================================================================================
|
||||
|
||||
@@ -20,7 +20,6 @@ package org.springframework.security.access;
|
||||
* required authority.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AccessDeniedException extends RuntimeException {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
@@ -25,7 +25,6 @@ import org.springframework.security.core.Authentication;
|
||||
* Indicates a class is responsible for participating in an {@link AfterInvocationProviderManager} decision.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public interface AfterInvocationProvider {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
-1
@@ -22,7 +22,6 @@ package org.springframework.security.access;
|
||||
* argument, for example.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AuthorizationServiceException extends AccessDeniedException {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
@@ -33,7 +33,6 @@ import org.springframework.security.access.intercept.RunAsManager;
|
||||
* Stored at runtime with other <code>ConfigAttribute</code>s for the same secure object target.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public interface ConfigAttribute extends Serializable {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
@@ -27,7 +27,6 @@ import java.beans.PropertyEditorSupport;
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @deprecated
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ConfigAttributeEditor extends PropertyEditorSupport {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
@@ -10,7 +10,6 @@ import org.springframework.security.core.Authentication;
|
||||
*
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
public interface PermissionEvaluator {
|
||||
|
||||
@@ -25,7 +25,6 @@ import org.springframework.util.StringUtils;
|
||||
* Stores a {@link ConfigAttribute} as a <code>String</code>.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class SecurityConfig implements ConfigAttribute {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
@@ -26,7 +26,6 @@ import org.springframework.security.access.intercept.AbstractSecurityInterceptor
|
||||
* invocation.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public interface SecurityMetadataSource extends AopInfrastructureBean {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
-1
@@ -34,7 +34,6 @@ import org.springframework.security.access.method.AbstractFallbackMethodSecurity
|
||||
* Sources method security metadata from major JSR 250 security annotations.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
* @since 2.0
|
||||
*/
|
||||
public class Jsr250MethodSecurityMetadataSource extends AbstractFallbackMethodSecurityMetadataSource {
|
||||
|
||||
@@ -40,7 +40,6 @@ import java.lang.annotation.Target;
|
||||
* public void delete(Contact contact);
|
||||
* </pre>
|
||||
* @author Mark St.Godard
|
||||
* @version $Id$
|
||||
*/
|
||||
@Target({ElementType.METHOD, ElementType.TYPE})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
-1
@@ -31,7 +31,6 @@ import org.springframework.security.access.method.AbstractFallbackMethodSecurity
|
||||
* Sources method security metadata from Spring Security's {@link Secured} annotation.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class SecuredAnnotationSecurityMetadataSource extends AbstractFallbackMethodSecurityMetadataSource {
|
||||
|
||||
|
||||
-1
@@ -22,7 +22,6 @@ import org.springframework.context.ApplicationEvent;
|
||||
* Abstract superclass for all security interception related events.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class AbstractAuthorizationEvent extends ApplicationEvent {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
-1
@@ -26,7 +26,6 @@ import org.springframework.security.authentication.AuthenticationCredentialsNotF
|
||||
* the <code>SecurityContextHolder</code>.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AuthenticationCredentialsNotFoundEvent extends AbstractAuthorizationEvent {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
-1
@@ -31,7 +31,6 @@ import org.springframework.security.core.Authentication;
|
||||
* {@link org.springframework.security.access.intercept.AfterInvocationManager AfterInvocationManager}.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AuthorizationFailureEvent extends AbstractAuthorizationEvent {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
@@ -26,7 +26,6 @@ import org.springframework.security.core.Authentication;
|
||||
* proceed.</p>
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AuthorizedEvent extends AbstractAuthorizationEvent {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
@@ -28,7 +28,6 @@ import org.springframework.context.ApplicationListener;
|
||||
* </p>
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class LoggerListener implements ApplicationListener<AbstractAuthorizationEvent> {
|
||||
//~ Static fields/initializers =====================================================================================
|
||||
|
||||
-1
@@ -22,7 +22,6 @@ package org.springframework.security.access.event;
|
||||
* <p>Published just before the secure object attempts to proceed.</p>
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class PublicInvocationEvent extends AbstractAuthorizationEvent {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
-1
@@ -15,7 +15,6 @@ import org.springframework.security.core.authority.AuthorityUtils;
|
||||
* Base root object for use in Spring Security expression evaluations.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
public abstract class SecurityExpressionRoot {
|
||||
|
||||
-1
@@ -14,7 +14,6 @@ import org.springframework.util.Assert;
|
||||
* Either filter or authorization expressions may be null, but not both.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
abstract class AbstractExpressionBasedMethodConfigAttribute implements ConfigAttribute {
|
||||
|
||||
-1
@@ -27,7 +27,6 @@ import org.springframework.security.core.Authentication;
|
||||
* A single instance should usually be shared amongst the beans that require expression support.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
public class DefaultMethodSecurityExpressionHandler implements MethodSecurityExpressionHandler {
|
||||
|
||||
-1
@@ -12,7 +12,6 @@ import org.springframework.security.core.Authentication;
|
||||
* evaluation should not be required.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
class DenyAllPermissionEvaluator implements PermissionEvaluator {
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import org.springframework.security.access.prepost.PrePostInvocationAttributeFac
|
||||
* an expression to be evaluated at runtime.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
public class ExpressionBasedAnnotationAttributeFactory implements PrePostInvocationAttributeFactory {
|
||||
|
||||
-1
@@ -14,7 +14,6 @@ import org.springframework.security.core.Authentication;
|
||||
/**
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
public class ExpressionBasedPostInvocationAdvice implements PostInvocationAuthorizationAdvice{
|
||||
|
||||
-1
@@ -17,7 +17,6 @@ import org.springframework.security.core.Authentication;
|
||||
* Method pre-invocation handling based on expressions.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since
|
||||
*/
|
||||
public class ExpressionBasedPreInvocationAdvice implements PreInvocationAuthorizationAdvice {
|
||||
|
||||
-1
@@ -11,7 +11,6 @@ import org.springframework.security.core.Authentication;
|
||||
* from the implementation of the underlying expression objects.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
public interface MethodSecurityExpressionHandler {
|
||||
|
||||
-1
@@ -11,7 +11,6 @@ import org.springframework.security.core.Authentication;
|
||||
* Extended expression root object which contains extra method-specific functionality.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
class MethodSecurityExpressionRoot extends SecurityExpressionRoot {
|
||||
|
||||
-1
@@ -7,7 +7,6 @@ import org.springframework.security.access.prepost.PostInvocationAttribute;
|
||||
/**
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
class PostInvocationExpressionAttribute extends AbstractExpressionBasedMethodConfigAttribute
|
||||
|
||||
-1
@@ -7,7 +7,6 @@ import org.springframework.security.access.prepost.PreInvocationAttribute;
|
||||
/**
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
class PreInvocationExpressionAttribute extends AbstractExpressionBasedMethodConfigAttribute
|
||||
|
||||
+30
-30
@@ -1,30 +1,30 @@
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.access.hierarchicalroles;
|
||||
|
||||
/**
|
||||
* Exception that is thrown because of a cycle in the role hierarchy definition
|
||||
*
|
||||
* @author Michael Mayr
|
||||
*/
|
||||
public class CycleInRoleHierarchyException extends RuntimeException {
|
||||
|
||||
private static final long serialVersionUID = -4970510612118296707L;
|
||||
|
||||
public CycleInRoleHierarchyException() {
|
||||
super("Exception thrown because of a cycle in the role hierarchy definition!");
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.access.hierarchicalroles;
|
||||
|
||||
/**
|
||||
* Exception that is thrown because of a cycle in the role hierarchy definition
|
||||
*
|
||||
* @author Michael Mayr
|
||||
*/
|
||||
public class CycleInRoleHierarchyException extends RuntimeException {
|
||||
|
||||
private static final long serialVersionUID = -4970510612118296707L;
|
||||
|
||||
public CycleInRoleHierarchyException() {
|
||||
super("Exception thrown because of a cycle in the role hierarchy definition!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-1
@@ -7,7 +7,6 @@ import org.springframework.security.core.GrantedAuthority;
|
||||
/**
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
public final class NullRoleHierarchy implements RoleHierarchy {
|
||||
|
||||
+45
-45
@@ -1,45 +1,45 @@
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.access.hierarchicalroles;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
|
||||
/**
|
||||
* The simple interface of a role hierarchy.
|
||||
*
|
||||
* @author Michael Mayr
|
||||
*/
|
||||
public interface RoleHierarchy {
|
||||
|
||||
/**
|
||||
* Returns an array of all reachable authorities.
|
||||
* <p>
|
||||
* Reachable authorities are the directly assigned authorities plus all
|
||||
* authorities that are (transitively) reachable from them in the role
|
||||
* hierarchy.
|
||||
* <p>
|
||||
* Example:<br>
|
||||
* Role hierarchy: ROLE_A > ROLE_B and ROLE_B > ROLE_C.<br>
|
||||
* Directly assigned authority: ROLE_A.<br>
|
||||
* Reachable authorities: ROLE_A, ROLE_B, ROLE_C.
|
||||
*
|
||||
* @param authorities - List of the directly assigned authorities.
|
||||
* @return List of all reachable authorities given the assigned authorities.
|
||||
*/
|
||||
public Collection<GrantedAuthority> getReachableGrantedAuthorities(Collection<GrantedAuthority> authorities);
|
||||
|
||||
}
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.access.hierarchicalroles;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
|
||||
/**
|
||||
* The simple interface of a role hierarchy.
|
||||
*
|
||||
* @author Michael Mayr
|
||||
*/
|
||||
public interface RoleHierarchy {
|
||||
|
||||
/**
|
||||
* Returns an array of all reachable authorities.
|
||||
* <p>
|
||||
* Reachable authorities are the directly assigned authorities plus all
|
||||
* authorities that are (transitively) reachable from them in the role
|
||||
* hierarchy.
|
||||
* <p>
|
||||
* Example:<br>
|
||||
* Role hierarchy: ROLE_A > ROLE_B and ROLE_B > ROLE_C.<br>
|
||||
* Directly assigned authority: ROLE_A.<br>
|
||||
* Reachable authorities: ROLE_A, ROLE_B, ROLE_C.
|
||||
*
|
||||
* @param authorities - List of the directly assigned authorities.
|
||||
* @return List of all reachable authorities given the assigned authorities.
|
||||
*/
|
||||
public Collection<GrantedAuthority> getReachableGrantedAuthorities(Collection<GrantedAuthority> authorities);
|
||||
|
||||
}
|
||||
|
||||
+54
-54
@@ -1,55 +1,55 @@
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.access.hierarchicalroles;
|
||||
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
|
||||
/**
|
||||
* This class wraps Spring Security's <tt>UserDetailsService</tt> in a way that its <tt>loadUserByUsername()</tt>
|
||||
* method returns wrapped <tt>UserDetails</tt> that return all hierachically reachable authorities
|
||||
* instead of only the directly assigned authorities.
|
||||
*
|
||||
* @author Michael Mayr
|
||||
* @deprecated use a {@link RoleHierarchyVoter} instead of populating the user Authentication object
|
||||
* with the additional authorities.
|
||||
*/
|
||||
public class UserDetailsServiceWrapper implements UserDetailsService {
|
||||
|
||||
private UserDetailsService userDetailsService = null;
|
||||
|
||||
private RoleHierarchy roleHierarchy = null;
|
||||
|
||||
public void setRoleHierarchy(RoleHierarchy roleHierarchy) {
|
||||
this.roleHierarchy = roleHierarchy;
|
||||
}
|
||||
|
||||
public void setUserDetailsService(UserDetailsService userDetailsService) {
|
||||
this.userDetailsService = userDetailsService;
|
||||
}
|
||||
|
||||
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException, DataAccessException {
|
||||
UserDetails userDetails = userDetailsService.loadUserByUsername(username);
|
||||
// wrapped UserDetailsService might throw UsernameNotFoundException or DataAccessException which will then bubble up
|
||||
return new UserDetailsWrapper(userDetails, roleHierarchy);
|
||||
}
|
||||
|
||||
public UserDetailsService getWrappedUserDetailsService() {
|
||||
return userDetailsService;
|
||||
}
|
||||
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.access.hierarchicalroles;
|
||||
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
|
||||
/**
|
||||
* This class wraps Spring Security's <tt>UserDetailsService</tt> in a way that its <tt>loadUserByUsername()</tt>
|
||||
* method returns wrapped <tt>UserDetails</tt> that return all hierachically reachable authorities
|
||||
* instead of only the directly assigned authorities.
|
||||
*
|
||||
* @author Michael Mayr
|
||||
* @deprecated use a {@link RoleHierarchyVoter} instead of populating the user Authentication object
|
||||
* with the additional authorities.
|
||||
*/
|
||||
public class UserDetailsServiceWrapper implements UserDetailsService {
|
||||
|
||||
private UserDetailsService userDetailsService = null;
|
||||
|
||||
private RoleHierarchy roleHierarchy = null;
|
||||
|
||||
public void setRoleHierarchy(RoleHierarchy roleHierarchy) {
|
||||
this.roleHierarchy = roleHierarchy;
|
||||
}
|
||||
|
||||
public void setUserDetailsService(UserDetailsService userDetailsService) {
|
||||
this.userDetailsService = userDetailsService;
|
||||
}
|
||||
|
||||
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException, DataAccessException {
|
||||
UserDetails userDetails = userDetailsService.loadUserByUsername(username);
|
||||
// wrapped UserDetailsService might throw UsernameNotFoundException or DataAccessException which will then bubble up
|
||||
return new UserDetailsWrapper(userDetails, roleHierarchy);
|
||||
}
|
||||
|
||||
public UserDetailsService getWrappedUserDetailsService() {
|
||||
return userDetailsService;
|
||||
}
|
||||
|
||||
}
|
||||
+76
-76
@@ -1,76 +1,76 @@
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.access.hierarchicalroles;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.springframework.security.access.vote.RoleHierarchyVoter;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
|
||||
/**
|
||||
* This class wraps Spring Security's <tt>UserDetails</tt> in a way that its <tt>getAuthorities()</tt> method is
|
||||
* delegated to <tt>RoleHierarchy.getReachableGrantedAuthorities</tt>. All other methods are
|
||||
* delegated to the <tt>UserDetails</tt> implementation.
|
||||
*
|
||||
* @author Michael Mayr
|
||||
* @deprecated use a {@link RoleHierarchyVoter} instead.
|
||||
*/
|
||||
public class UserDetailsWrapper implements UserDetails {
|
||||
|
||||
private static final long serialVersionUID = 1532428778390085311L;
|
||||
|
||||
private UserDetails userDetails = null;
|
||||
|
||||
private RoleHierarchy roleHierarchy = null;
|
||||
|
||||
public UserDetailsWrapper(UserDetails userDetails, RoleHierarchy roleHierarchy) {
|
||||
this.userDetails = userDetails;
|
||||
this.roleHierarchy = roleHierarchy;
|
||||
}
|
||||
|
||||
public boolean isAccountNonExpired() {
|
||||
return userDetails.isAccountNonExpired();
|
||||
}
|
||||
|
||||
public boolean isAccountNonLocked() {
|
||||
return userDetails.isAccountNonLocked();
|
||||
}
|
||||
|
||||
public Collection<GrantedAuthority> getAuthorities() {
|
||||
return roleHierarchy.getReachableGrantedAuthorities(userDetails.getAuthorities());
|
||||
}
|
||||
|
||||
public boolean isCredentialsNonExpired() {
|
||||
return userDetails.isCredentialsNonExpired();
|
||||
}
|
||||
|
||||
public boolean isEnabled() {
|
||||
return userDetails.isEnabled();
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return userDetails.getPassword();
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return userDetails.getUsername();
|
||||
}
|
||||
|
||||
public UserDetails getUnwrappedUserDetails() {
|
||||
return userDetails;
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.access.hierarchicalroles;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.springframework.security.access.vote.RoleHierarchyVoter;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
|
||||
/**
|
||||
* This class wraps Spring Security's <tt>UserDetails</tt> in a way that its <tt>getAuthorities()</tt> method is
|
||||
* delegated to <tt>RoleHierarchy.getReachableGrantedAuthorities</tt>. All other methods are
|
||||
* delegated to the <tt>UserDetails</tt> implementation.
|
||||
*
|
||||
* @author Michael Mayr
|
||||
* @deprecated use a {@link RoleHierarchyVoter} instead.
|
||||
*/
|
||||
public class UserDetailsWrapper implements UserDetails {
|
||||
|
||||
private static final long serialVersionUID = 1532428778390085311L;
|
||||
|
||||
private UserDetails userDetails = null;
|
||||
|
||||
private RoleHierarchy roleHierarchy = null;
|
||||
|
||||
public UserDetailsWrapper(UserDetails userDetails, RoleHierarchy roleHierarchy) {
|
||||
this.userDetails = userDetails;
|
||||
this.roleHierarchy = roleHierarchy;
|
||||
}
|
||||
|
||||
public boolean isAccountNonExpired() {
|
||||
return userDetails.isAccountNonExpired();
|
||||
}
|
||||
|
||||
public boolean isAccountNonLocked() {
|
||||
return userDetails.isAccountNonLocked();
|
||||
}
|
||||
|
||||
public Collection<GrantedAuthority> getAuthorities() {
|
||||
return roleHierarchy.getReachableGrantedAuthorities(userDetails.getAuthorities());
|
||||
}
|
||||
|
||||
public boolean isCredentialsNonExpired() {
|
||||
return userDetails.isCredentialsNonExpired();
|
||||
}
|
||||
|
||||
public boolean isEnabled() {
|
||||
return userDetails.isEnabled();
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return userDetails.getPassword();
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return userDetails.getUsername();
|
||||
}
|
||||
|
||||
public UserDetails getUnwrappedUserDetails() {
|
||||
return userDetails;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-1
@@ -90,7 +90,6 @@ import org.springframework.util.Assert;
|
||||
* </ol>
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class AbstractSecurityInterceptor implements InitializingBean, ApplicationEventPublisherAware,
|
||||
MessageSourceAware {
|
||||
|
||||
-1
@@ -46,7 +46,6 @@ import org.springframework.security.core.Authentication;
|
||||
* </p>
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public interface AfterInvocationManager {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
-1
@@ -41,7 +41,6 @@ import org.springframework.util.Assert;
|
||||
* object invocation did not include a configuration attribute a given provider is configured to respond to).
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AfterInvocationProviderManager implements AfterInvocationManager, InitializingBean {
|
||||
//~ Static fields/initializers =====================================================================================
|
||||
|
||||
-1
@@ -29,7 +29,6 @@ import org.springframework.security.core.Authentication;
|
||||
* can tidy up correctly.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class InterceptorStatusToken {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
-1
@@ -37,7 +37,6 @@ import org.springframework.util.Assert;
|
||||
* allowed to at least attempt to invoke the method, irrespective of the "after" invocation handling.</p>
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class MethodInvocationPrivilegeEvaluator implements InitializingBean {
|
||||
//~ Static fields/initializers =====================================================================================
|
||||
|
||||
@@ -27,7 +27,6 @@ import org.springframework.security.core.Authentication;
|
||||
* This class should be used if you do not require run-as authentication replacement functionality.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
final class NullRunAsManager implements RunAsManager {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
@@ -60,7 +60,6 @@ import org.springframework.security.core.Authentication;
|
||||
* </p>
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public interface RunAsManager {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
@@ -48,7 +48,6 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @author colin sampaleanu
|
||||
* @version $Id$
|
||||
*/
|
||||
public class RunAsManagerImpl implements RunAsManager, InitializingBean {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
@@ -27,7 +27,6 @@ import org.springframework.security.core.GrantedAuthority;
|
||||
* An immutable {@link org.springframework.security.core.Authentication} implementation that supports {@link RunAsManagerImpl}.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class RunAsUserToken extends AbstractAuthenticationToken {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
-1
@@ -34,7 +34,6 @@ import org.aopalliance.intercept.MethodInvocation;
|
||||
* Refer to {@link AbstractSecurityInterceptor} for details on the workflow.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class MethodSecurityInterceptor extends AbstractSecurityInterceptor implements MethodInterceptor {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
-1
@@ -45,7 +45,6 @@ import org.springframework.util.Assert;
|
||||
* Based on Spring's TransactionAttributeSourceAdvisor.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class MethodSecurityMetadataSourceAdvisor extends AbstractPointcutAdvisor implements BeanFactoryAware {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
-1
@@ -6,7 +6,6 @@ package org.springframework.security.access.intercept.aspectj;
|
||||
* AspectJ processing to continue.
|
||||
*
|
||||
* @author Mike Wiesner
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
public interface AspectJAnnotationCallback {
|
||||
|
||||
-1
@@ -11,7 +11,6 @@ import org.aspectj.lang.JoinPoint;
|
||||
* AspectJ interceptor that supports @Aspect notation.
|
||||
*
|
||||
* @author Mike Wiesner
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AspectJAnnotationSecurityInterceptor extends AbstractSecurityInterceptor {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
-1
@@ -22,7 +22,6 @@ package org.springframework.security.access.intercept.aspectj;
|
||||
* statement.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public interface AspectJCallback {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
-1
@@ -37,7 +37,6 @@ import org.aspectj.lang.JoinPoint;
|
||||
* Refer to {@link AbstractSecurityInterceptor} for details on the workflow.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AspectJSecurityInterceptor extends AbstractSecurityInterceptor {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
-1
@@ -22,7 +22,6 @@ import org.springframework.util.ClassUtils;
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @author Luke taylor
|
||||
* @version $Id$
|
||||
* @since 2.0
|
||||
*/
|
||||
public abstract class AbstractFallbackMethodSecurityMetadataSource extends AbstractMethodSecurityMetadataSource {
|
||||
|
||||
-1
@@ -38,7 +38,6 @@ import java.util.Collection;
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class AbstractMethodSecurityMetadataSource implements MethodSecurityMetadataSource {
|
||||
|
||||
|
||||
-1
@@ -20,7 +20,6 @@ import org.springframework.util.ObjectUtils;
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
*/
|
||||
public final class DelegatingMethodSecurityMetadataSource extends AbstractMethodSecurityMetadataSource implements InitializingBean {
|
||||
private final static List<ConfigAttribute> NULL_CONFIG_ATTRIBUTE = Collections.emptyList();
|
||||
|
||||
-1
@@ -40,7 +40,6 @@ import org.springframework.util.ClassUtils;
|
||||
* </p>
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
* @since 2.0
|
||||
*/
|
||||
public class MapBasedMethodSecurityMetadataSource extends AbstractFallbackMethodSecurityMetadataSource implements BeanClassLoaderAware {
|
||||
|
||||
-1
@@ -27,7 +27,6 @@ import org.springframework.security.access.SecurityMetadataSource;
|
||||
* that are designed to perform lookups keyed on <code>Method</code>s.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public interface MethodSecurityMetadataSource extends SecurityMetadataSource {
|
||||
public Collection<ConfigAttribute> getAttributes(Method method, Class<?> targetClass);
|
||||
|
||||
-1
@@ -36,7 +36,6 @@ import org.springframework.util.StringUtils;
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @deprecated use method annotations or the protect-pointcut support from the namespace
|
||||
* @version $Id$
|
||||
*/
|
||||
public class MethodSecurityMetadataSourceEditor extends PropertyEditorSupport {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
@@ -11,7 +11,6 @@ import java.lang.annotation.Target;
|
||||
* Annotation for specifying a method access-control expression which will be evaluated after a method has been invoked.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
@Target({ElementType.METHOD, ElementType.TYPE})
|
||||
|
||||
@@ -11,7 +11,6 @@ import java.lang.annotation.Target;
|
||||
* Annotation for specifying a method filtering expression which will be evaluated after a method has been invoked.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
@Target({ElementType.METHOD, ElementType.TYPE})
|
||||
|
||||
-1
@@ -15,7 +15,6 @@ import org.springframework.security.core.Authentication;
|
||||
* passing it the <tt>PostInvocationAttribute</tt> created from @PostAuthorize and @PostFilter annotations.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
public class PostInvocationAdviceProvider implements AfterInvocationProvider {
|
||||
|
||||
-1
@@ -8,7 +8,6 @@ import org.springframework.security.access.ConfigAttribute;
|
||||
* Consumed by a {@link PostInvocationAuthorizationAdvice}.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
public interface PostInvocationAttribute extends ConfigAttribute {
|
||||
|
||||
-1
@@ -9,7 +9,6 @@ import org.springframework.security.core.Authentication;
|
||||
* Performs filtering and authorization logic after a method is invoked.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
public interface PostInvocationAuthorizationAdvice extends AopInfrastructureBean {
|
||||
|
||||
@@ -12,7 +12,6 @@ import java.lang.annotation.Target;
|
||||
* method invocation is allowed or not.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
@Target({ElementType.METHOD, ElementType.TYPE})
|
||||
|
||||
@@ -22,7 +22,6 @@ import java.lang.annotation.Target;
|
||||
* expression to refer to the current object which is being evaluated.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
@Target({ElementType.METHOD, ElementType.TYPE})
|
||||
|
||||
-1
@@ -8,7 +8,6 @@ import org.springframework.security.access.ConfigAttribute;
|
||||
* Consumed by a {@link PreInvocationAuthorizationAdvice}.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
public interface PreInvocationAttribute extends ConfigAttribute{
|
||||
|
||||
-1
@@ -8,7 +8,6 @@ import org.springframework.security.core.Authentication;
|
||||
* Performs argument filtering and authorization logic before a method is invoked.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
public interface PreInvocationAuthorizationAdvice extends AopInfrastructureBean {
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import org.springframework.security.core.Authentication;
|
||||
* voter-based <tt>AccessDecisionManager</tt> implementations used by Spring Security.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
public class PreInvocationAuthorizationAdviceVoter implements AccessDecisionVoter {
|
||||
|
||||
-1
@@ -27,7 +27,6 @@ import org.springframework.util.ClassUtils;
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @since 3.0
|
||||
* @version $Id$
|
||||
*/
|
||||
public class PrePostAnnotationSecurityMetadataSource extends AbstractMethodSecurityMetadataSource {
|
||||
|
||||
|
||||
-1
@@ -5,7 +5,6 @@ import org.springframework.aop.framework.AopInfrastructureBean;
|
||||
/**
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
public interface PrePostInvocationAttributeFactory extends AopInfrastructureBean {
|
||||
|
||||
@@ -30,7 +30,6 @@ import org.springframework.util.Assert;
|
||||
* Not bound to any particular ACL system.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class AbstractAclVoter implements AccessDecisionVoter {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
@@ -40,7 +40,6 @@ import org.springframework.util.Assert;
|
||||
* All comparisons and prefixes are case sensitive.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AuthenticatedVoter implements AccessDecisionVoter {
|
||||
//~ Static fields/initializers =====================================================================================
|
||||
|
||||
-1
@@ -24,7 +24,6 @@ import java.lang.reflect.Method;
|
||||
* or retrieval of the label.
|
||||
*
|
||||
* @author Greg Turnquist
|
||||
* @version $Id$
|
||||
*/
|
||||
public class InterfaceBasedLabelParameterStrategy implements LabelParameterStrategy {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
@@ -43,7 +43,6 @@ import org.springframework.util.Assert;
|
||||
* by setting up the <tt>labelMap</tt> in the application context.</p>
|
||||
*
|
||||
* @author Greg Turnquist
|
||||
* @version $Id$
|
||||
*
|
||||
* @see org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor
|
||||
* @deprecated Use new spring-security-acl module instead
|
||||
|
||||
-1
@@ -23,7 +23,6 @@ import java.lang.reflect.Method;
|
||||
* mechanism to define various ways to label data.
|
||||
*
|
||||
* @author Greg Turnquist
|
||||
* @version $Id$
|
||||
*/
|
||||
public interface LabelParameterStrategy {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
@@ -48,7 +48,6 @@ import org.springframework.security.core.GrantedAuthority;
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @author colin sampaleanu
|
||||
* @version $Id$
|
||||
*/
|
||||
public class RoleVoter implements AccessDecisionVoter {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
+1
-2
@@ -22,7 +22,6 @@ import org.springframework.security.core.AuthenticationException;
|
||||
* An abstract implementation of the {@link AuthenticationManager}.
|
||||
*
|
||||
* @author Wesley Hall
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class AbstractAuthenticationManager implements AuthenticationManager {
|
||||
|
||||
@@ -77,7 +76,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.core.AuthenticationException#getExtraInformation()
|
||||
* @see org.springframework.security.core.AuthenticationException#getExtraInformation()
|
||||
*/
|
||||
public void setClearExtraInformation(boolean clearExtraInformation) {
|
||||
this.clearExtraInformation = clearExtraInformation;
|
||||
|
||||
-1
@@ -33,7 +33,6 @@ import org.springframework.security.core.userdetails.UserDetails;
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class AbstractAuthenticationToken implements Authentication {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
-1
@@ -20,7 +20,6 @@ package org.springframework.security.authentication;
|
||||
* whether or not the credentials were valid.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AccountExpiredException extends AccountStatusException {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
-1
@@ -7,7 +7,6 @@ import org.springframework.security.core.AuthenticationException;
|
||||
* user account status (locked, disabled etc).
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class AccountStatusException extends AuthenticationException {
|
||||
public AccountStatusException(String msg) {
|
||||
|
||||
-1
@@ -7,7 +7,6 @@ import org.springframework.context.support.MessageSourceAccessor;
|
||||
|
||||
/**
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AccountStatusUserDetailsChecker implements UserDetailsChecker {
|
||||
|
||||
|
||||
-1
@@ -32,7 +32,6 @@ import org.springframework.util.Assert;
|
||||
* {@link #getKey()}.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AnonymousAuthenticationProvider implements AuthenticationProvider, InitializingBean, MessageSourceAware {
|
||||
|
||||
|
||||
-1
@@ -27,7 +27,6 @@ import java.util.List;
|
||||
* Represents an anonymous <code>Authentication</code>.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AnonymousAuthenticationToken extends AbstractAuthenticationToken implements Serializable {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
-1
@@ -23,7 +23,6 @@ import org.springframework.security.core.AuthenticationException;
|
||||
* org.springframework.security.core.context.SecurityContext SecurityContext}.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AuthenticationCredentialsNotFoundException extends AuthenticationException {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
+35
-36
@@ -1,36 +1,35 @@
|
||||
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
/**
|
||||
* Provides a {@link org.springframework.security.core.Authentication#getDetails()} object for
|
||||
* a given web request.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public interface AuthenticationDetailsSource {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
/**
|
||||
* Called by a class when it wishes a new authentication details instance to be created.
|
||||
*
|
||||
* @param context the request object, which may be used by the authentication details object
|
||||
*
|
||||
* @return a fully-configured authentication details instance
|
||||
*/
|
||||
Object buildDetails(Object context);
|
||||
}
|
||||
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
/**
|
||||
* Provides a {@link org.springframework.security.core.Authentication#getDetails()} object for
|
||||
* a given web request.
|
||||
*
|
||||
* @author Ben Alex
|
||||
*/
|
||||
public interface AuthenticationDetailsSource {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
/**
|
||||
* Called by a class when it wishes a new authentication details instance to be created.
|
||||
*
|
||||
* @param context the request object, which may be used by the authentication details object
|
||||
*
|
||||
* @return a fully-configured authentication details instance
|
||||
*/
|
||||
Object buildDetails(Object context);
|
||||
}
|
||||
|
||||
-1
@@ -6,7 +6,6 @@ import org.springframework.security.core.AuthenticationException;
|
||||
/**
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
public interface AuthenticationEventPublisher {
|
||||
|
||||
-1
@@ -22,7 +22,6 @@ import org.springframework.security.core.AuthenticationException;
|
||||
* Processes an {@link Authentication} request.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public interface AuthenticationManager {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
-1
@@ -24,7 +24,6 @@ import org.springframework.security.core.AuthenticationException;
|
||||
* org.springframework.security.core.Authentication} implementation.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public interface AuthenticationProvider {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
-1
@@ -22,7 +22,6 @@ import org.springframework.security.core.AuthenticationException;
|
||||
* backend authentication repository is unavailable.</p>
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AuthenticationServiceException extends AuthenticationException {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
-1
@@ -21,7 +21,6 @@ import org.springframework.security.core.Authentication;
|
||||
* Evaluates <code>Authentication</code> tokens
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public interface AuthenticationTrustResolver {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
-1
@@ -27,7 +27,6 @@ import org.springframework.security.core.Authentication;
|
||||
* always return <code>false</code>.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AuthenticationTrustResolverImpl implements AuthenticationTrustResolver {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
-1
@@ -22,7 +22,6 @@ import org.springframework.security.core.AuthenticationException;
|
||||
* thrown, it means the account is neither locked nor disabled.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class BadCredentialsException extends AuthenticationException {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
-1
@@ -20,7 +20,6 @@ package org.springframework.security.authentication;
|
||||
* assertion as to whether or not the credentials were valid.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class CredentialsExpiredException extends AccountStatusException {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
-1
@@ -37,7 +37,6 @@ import org.springframework.util.Assert;
|
||||
* and provides its constructor. The <tt>additionalExceptionMappings</tt> will be merged with the default ones.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 3.0
|
||||
*/
|
||||
public class DefaultAuthenticationEventPublisher implements AuthenticationEventPublisher,
|
||||
|
||||
@@ -20,7 +20,6 @@ package org.springframework.security.authentication;
|
||||
* whether or not the credentials were valid.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class DisabledException extends AccountStatusException {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
-1
@@ -28,7 +28,6 @@ import org.springframework.security.core.AuthenticationException;
|
||||
* level of authentication.</p>
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class InsufficientAuthenticationException extends AuthenticationException {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
@@ -21,7 +21,6 @@ package org.springframework.security.authentication;
|
||||
* or not the credentials were valid.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class LockedException extends AccountStatusException {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
@@ -62,7 +62,6 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
*
|
||||
* @see DefaultAuthenticationEventPublisher
|
||||
*/
|
||||
|
||||
-1
@@ -24,7 +24,6 @@ import org.springframework.security.core.AuthenticationException;
|
||||
* presented {@link org.springframework.security.core.Authentication} object.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ProviderNotFoundException extends AuthenticationException {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
-1
@@ -28,7 +28,6 @@ import org.springframework.security.core.GrantedAuthority;
|
||||
* <code>GrantedAuthority</code>s that apply.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class RememberMeAuthenticationToken extends AbstractAuthenticationToken implements Serializable {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
-1
@@ -27,7 +27,6 @@ import org.springframework.security.core.AuthenticationException;
|
||||
* on a production system</b>.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class TestingAuthenticationProvider implements AuthenticationProvider {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
-1
@@ -28,7 +28,6 @@ import org.springframework.security.core.authority.AuthorityUtils;
|
||||
* The corresponding authentication provider is {@link TestingAuthenticationProvider}.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
*/
|
||||
public class TestingAuthenticationToken extends AbstractAuthenticationToken {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user