mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-01 09:42:13 +00:00
Remove superfluous comments
Use '^\s+//\ \~\ .*$' and '^\s+//\ ============+$' regular expression searches to remove superfluous comments. Prior to this commit, many classes would have comments to indicate blocks of code (such as constructors/methods/instance fields). These added a lot of noise and weren't all that helpful, especially given the outline views available in most modern IDEs. Issue gh-8945
This commit is contained in:
parent
b7fc18262d
commit
71bc145ae4
@ -96,14 +96,8 @@ import org.springframework.util.StringUtils;
|
||||
*/
|
||||
public class AclEntryVoter extends AbstractAclVoter {
|
||||
|
||||
// ~ Static fields/initializers
|
||||
// =====================================================================================
|
||||
|
||||
private static final Log logger = LogFactory.getLog(AclEntryVoter.class);
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private AclService aclService;
|
||||
|
||||
private ObjectIdentityRetrievalStrategy objectIdentityRetrievalStrategy = new ObjectIdentityRetrievalStrategyImpl();
|
||||
@ -116,9 +110,6 @@ public class AclEntryVoter extends AbstractAclVoter {
|
||||
|
||||
private List<Permission> requirePermission;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
public AclEntryVoter(AclService aclService, String processConfigAttribute, Permission[] requirePermission) {
|
||||
Assert.notNull(processConfigAttribute, "A processConfigAttribute is mandatory");
|
||||
Assert.notNull(aclService, "An AclService is mandatory");
|
||||
@ -132,9 +123,6 @@ public class AclEntryVoter extends AbstractAclVoter {
|
||||
this.requirePermission = Arrays.asList(requirePermission);
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
/**
|
||||
* Optionally specifies a method of the domain object that will be used to obtain a
|
||||
* contained domain object. That contained domain object will be used for the ACL
|
||||
|
@ -41,9 +41,6 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public abstract class AbstractAclProvider implements AfterInvocationProvider {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
protected final AclService aclService;
|
||||
|
||||
protected Class<?> processDomainObjectClass = Object.class;
|
||||
@ -56,9 +53,6 @@ public abstract class AbstractAclProvider implements AfterInvocationProvider {
|
||||
|
||||
protected final List<Permission> requirePermission;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
public AbstractAclProvider(AclService aclService, String processConfigAttribute,
|
||||
List<Permission> requirePermission) {
|
||||
Assert.hasText(processConfigAttribute, "A processConfigAttribute is mandatory");
|
||||
@ -73,9 +67,6 @@ public abstract class AbstractAclProvider implements AfterInvocationProvider {
|
||||
this.requirePermission = requirePermission;
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
protected Class<?> getProcessDomainObjectClass() {
|
||||
return processDomainObjectClass;
|
||||
}
|
||||
|
@ -62,22 +62,13 @@ import org.springframework.security.core.Authentication;
|
||||
*/
|
||||
public class AclEntryAfterInvocationCollectionFilteringProvider extends AbstractAclProvider {
|
||||
|
||||
// ~ Static fields/initializers
|
||||
// =====================================================================================
|
||||
|
||||
protected static final Log logger = LogFactory.getLog(AclEntryAfterInvocationCollectionFilteringProvider.class);
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
public AclEntryAfterInvocationCollectionFilteringProvider(AclService aclService,
|
||||
List<Permission> requirePermission) {
|
||||
super(aclService, "AFTER_ACL_COLLECTION_READ", requirePermission);
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Object decide(Authentication authentication, Object object, Collection<ConfigAttribute> config,
|
||||
Object returnedObject) throws AccessDeniedException {
|
||||
|
@ -60,19 +60,10 @@ import org.springframework.security.core.SpringSecurityMessageSource;
|
||||
*/
|
||||
public class AclEntryAfterInvocationProvider extends AbstractAclProvider implements MessageSourceAware {
|
||||
|
||||
// ~ Static fields/initializers
|
||||
// =====================================================================================
|
||||
|
||||
protected static final Log logger = LogFactory.getLog(AclEntryAfterInvocationProvider.class);
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
protected MessageSourceAccessor messages = SpringSecurityMessageSource.getAccessor();
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
public AclEntryAfterInvocationProvider(AclService aclService, List<Permission> requirePermission) {
|
||||
this(aclService, "AFTER_ACL_READ", requirePermission);
|
||||
}
|
||||
@ -82,9 +73,6 @@ public class AclEntryAfterInvocationProvider extends AbstractAclProvider impleme
|
||||
super(aclService, processConfigAttribute, requirePermission);
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public Object decide(Authentication authentication, Object object, Collection<ConfigAttribute> config,
|
||||
Object returnedObject) throws AccessDeniedException {
|
||||
|
||||
|
@ -33,21 +33,12 @@ import org.apache.commons.logging.LogFactory;
|
||||
*/
|
||||
class ArrayFilterer<T> implements Filterer<T> {
|
||||
|
||||
// ~ Static fields/initializers
|
||||
// =====================================================================================
|
||||
|
||||
protected static final Log logger = LogFactory.getLog(ArrayFilterer.class);
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private final Set<T> removeList;
|
||||
|
||||
private final T[] list;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
ArrayFilterer(T[] list) {
|
||||
this.list = list;
|
||||
|
||||
@ -57,9 +48,6 @@ class ArrayFilterer<T> implements Filterer<T> {
|
||||
removeList = new HashSet<>();
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
/**
|
||||
*
|
||||
* @see org.springframework.security.acls.afterinvocation.Filterer#getFilteredObject()
|
||||
|
@ -32,21 +32,12 @@ import java.util.Set;
|
||||
*/
|
||||
class CollectionFilterer<T> implements Filterer<T> {
|
||||
|
||||
// ~ Static fields/initializers
|
||||
// =====================================================================================
|
||||
|
||||
protected static final Log logger = LogFactory.getLog(CollectionFilterer.class);
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private final Collection<T> collection;
|
||||
|
||||
private final Set<T> removeList;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
CollectionFilterer(Collection<T> collection) {
|
||||
this.collection = collection;
|
||||
|
||||
@ -60,9 +51,6 @@ class CollectionFilterer<T> implements Filterer<T> {
|
||||
removeList = new HashSet<>();
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
/**
|
||||
*
|
||||
* @see org.springframework.security.acls.afterinvocation.Filterer#getFilteredObject()
|
||||
|
@ -26,9 +26,6 @@ import java.util.Iterator;
|
||||
*/
|
||||
interface Filterer<T> extends Iterable<T> {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
/**
|
||||
* Gets the filtered collection or array.
|
||||
* @return the filtered collection or array
|
||||
|
@ -25,15 +25,10 @@ import org.springframework.security.acls.model.Permission;
|
||||
*/
|
||||
public abstract class AbstractPermission implements Permission {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
protected final char code;
|
||||
|
||||
protected int mask;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
/**
|
||||
* Sets the permission mask and uses the '*' character to represent active bits when
|
||||
* represented as a bit pattern string.
|
||||
@ -55,9 +50,6 @@ public abstract class AbstractPermission implements Permission {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public final boolean equals(Object arg0) {
|
||||
if (arg0 == null) {
|
||||
return false;
|
||||
|
@ -32,9 +32,6 @@ import java.io.Serializable;
|
||||
*/
|
||||
public class AccessControlEntryImpl implements AccessControlEntry, AuditableAccessControlEntry {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private final Acl acl;
|
||||
|
||||
private Permission permission;
|
||||
@ -49,9 +46,6 @@ public class AccessControlEntryImpl implements AccessControlEntry, AuditableAcce
|
||||
|
||||
private final boolean granting;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
public AccessControlEntryImpl(Serializable id, Acl acl, Sid sid, Permission permission, boolean granting,
|
||||
boolean auditSuccess, boolean auditFailure) {
|
||||
Assert.notNull(acl, "Acl required");
|
||||
@ -66,9 +60,6 @@ public class AccessControlEntryImpl implements AccessControlEntry, AuditableAcce
|
||||
this.auditFailure = auditFailure;
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
@Override
|
||||
public boolean equals(Object arg0) {
|
||||
if (!(arg0 instanceof AccessControlEntryImpl)) {
|
||||
|
@ -26,18 +26,12 @@ import org.springframework.security.acls.model.Acl;
|
||||
*/
|
||||
public interface AclAuthorizationStrategy {
|
||||
|
||||
// ~ Static fields/initializers
|
||||
// =====================================================================================
|
||||
|
||||
int CHANGE_OWNERSHIP = 0;
|
||||
|
||||
int CHANGE_AUDITING = 1;
|
||||
|
||||
int CHANGE_GENERAL = 2;
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
void securityCheck(Acl acl, int changeType);
|
||||
|
||||
}
|
||||
|
@ -46,9 +46,6 @@ import java.util.Set;
|
||||
*/
|
||||
public class AclAuthorizationStrategyImpl implements AclAuthorizationStrategy {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private final GrantedAuthority gaGeneralChanges;
|
||||
|
||||
private final GrantedAuthority gaModifyAuditing;
|
||||
@ -57,9 +54,6 @@ public class AclAuthorizationStrategyImpl implements AclAuthorizationStrategy {
|
||||
|
||||
private SidRetrievalStrategy sidRetrievalStrategy = new SidRetrievalStrategyImpl();
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
/**
|
||||
* Constructor. The only mandatory parameter relates to the system-wide
|
||||
* {@link GrantedAuthority} instances that can be held to always permit ACL changes.
|
||||
@ -83,9 +77,6 @@ public class AclAuthorizationStrategyImpl implements AclAuthorizationStrategy {
|
||||
}
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public void securityCheck(Acl acl, int changeType) {
|
||||
if ((SecurityContextHolder.getContext() == null)
|
||||
|| (SecurityContextHolder.getContext().getAuthentication() == null)
|
||||
|
@ -39,9 +39,6 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class AclImpl implements Acl, MutableAcl, AuditableAcl, OwnershipAcl {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private Acl parentAcl;
|
||||
|
||||
private transient AclAuthorizationStrategy aclAuthorizationStrategy;
|
||||
@ -61,9 +58,6 @@ public class AclImpl implements Acl, MutableAcl, AuditableAcl, OwnershipAcl {
|
||||
|
||||
private boolean entriesInheriting = true;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
/**
|
||||
* Minimal constructor, which should be used
|
||||
* {@link org.springframework.security.acls.model.MutableAclService#createAcl(ObjectIdentity)}
|
||||
@ -125,9 +119,6 @@ public class AclImpl implements Acl, MutableAcl, AuditableAcl, OwnershipAcl {
|
||||
private AclImpl() {
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
@Override
|
||||
public void deleteAce(int aceIndex) throws NotFoundException {
|
||||
aclAuthorizationStrategy.securityCheck(this, AclAuthorizationStrategy.CHANGE_GENERAL);
|
||||
|
@ -25,9 +25,6 @@ import org.springframework.security.acls.model.AccessControlEntry;
|
||||
*/
|
||||
public interface AuditLogger {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
void logIfNeeded(boolean granted, AccessControlEntry ace);
|
||||
|
||||
}
|
||||
|
@ -27,9 +27,6 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class ConsoleAuditLogger implements AuditLogger {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public void logIfNeeded(boolean granted, AccessControlEntry ace) {
|
||||
Assert.notNull(ace, "AccessControlEntry required");
|
||||
|
||||
|
@ -39,18 +39,12 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class EhCacheBasedAclCache implements AclCache {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private final Ehcache cache;
|
||||
|
||||
private PermissionGrantingStrategy permissionGrantingStrategy;
|
||||
|
||||
private AclAuthorizationStrategy aclAuthorizationStrategy;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
public EhCacheBasedAclCache(Ehcache cache, PermissionGrantingStrategy permissionGrantingStrategy,
|
||||
AclAuthorizationStrategy aclAuthorizationStrategy) {
|
||||
Assert.notNull(cache, "Cache required");
|
||||
@ -61,9 +55,6 @@ public class EhCacheBasedAclCache implements AclCache {
|
||||
this.aclAuthorizationStrategy = aclAuthorizationStrategy;
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public void evictFromCache(Serializable pk) {
|
||||
Assert.notNull(pk, "Primary key (identifier) required");
|
||||
|
||||
|
@ -32,14 +32,8 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class GrantedAuthoritySid implements Sid {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private final String grantedAuthority;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
public GrantedAuthoritySid(String grantedAuthority) {
|
||||
Assert.hasText(grantedAuthority, "GrantedAuthority required");
|
||||
this.grantedAuthority = grantedAuthority;
|
||||
@ -52,9 +46,6 @@ public class GrantedAuthoritySid implements Sid {
|
||||
this.grantedAuthority = grantedAuthority.getAuthority();
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
if ((object == null) || !(object instanceof GrantedAuthoritySid)) {
|
||||
|
@ -22,9 +22,6 @@ package org.springframework.security.acls.domain;
|
||||
*/
|
||||
public class IdentityUnavailableException extends RuntimeException {
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
/**
|
||||
* Constructs an <code>IdentityUnavailableException</code> with the specified message.
|
||||
* @param msg the detail message
|
||||
|
@ -32,16 +32,10 @@ import org.springframework.util.ClassUtils;
|
||||
*/
|
||||
public class ObjectIdentityImpl implements ObjectIdentity {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private final String type;
|
||||
|
||||
private Serializable identifier;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
public ObjectIdentityImpl(String type, Serializable identifier) {
|
||||
Assert.hasText(type, "Type required");
|
||||
Assert.notNull(identifier, "identifier required");
|
||||
@ -92,9 +86,6 @@ public class ObjectIdentityImpl implements ObjectIdentity {
|
||||
this.identifier = (Serializable) result;
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
/**
|
||||
* Important so caching operates properly.
|
||||
* <p>
|
||||
|
@ -31,9 +31,6 @@ import org.springframework.security.acls.model.ObjectIdentityRetrievalStrategy;
|
||||
*/
|
||||
public class ObjectIdentityRetrievalStrategyImpl implements ObjectIdentityRetrievalStrategy, ObjectIdentityGenerator {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public ObjectIdentity getObjectIdentity(Object domainObject) {
|
||||
return new ObjectIdentityImpl(domainObject);
|
||||
}
|
||||
|
@ -32,14 +32,8 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class PrincipalSid implements Sid {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private final String principal;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
public PrincipalSid(String principal) {
|
||||
Assert.hasText(principal, "Principal required");
|
||||
this.principal = principal;
|
||||
@ -52,9 +46,6 @@ public class PrincipalSid implements Sid {
|
||||
this.principal = authentication.getName();
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
if ((object == null) || !(object instanceof PrincipalSid)) {
|
||||
|
@ -51,9 +51,6 @@ public class SidRetrievalStrategyImpl implements SidRetrievalStrategy {
|
||||
this.roleHierarchy = roleHierarchy;
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public List<Sid> getSids(Authentication authentication) {
|
||||
Collection<? extends GrantedAuthority> authorities = roleHierarchy
|
||||
.getReachableGrantedAuthorities(authentication.getAuthorities());
|
||||
|
@ -40,18 +40,12 @@ import java.io.Serializable;
|
||||
*/
|
||||
public class SpringCacheBasedAclCache implements AclCache {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private final Cache cache;
|
||||
|
||||
private PermissionGrantingStrategy permissionGrantingStrategy;
|
||||
|
||||
private AclAuthorizationStrategy aclAuthorizationStrategy;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
public SpringCacheBasedAclCache(Cache cache, PermissionGrantingStrategy permissionGrantingStrategy,
|
||||
AclAuthorizationStrategy aclAuthorizationStrategy) {
|
||||
Assert.notNull(cache, "Cache required");
|
||||
@ -62,9 +56,6 @@ public class SpringCacheBasedAclCache implements AclCache {
|
||||
this.aclAuthorizationStrategy = aclAuthorizationStrategy;
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public void evictFromCache(Serializable pk) {
|
||||
Assert.notNull(pk, "Primary key (identifier) required");
|
||||
|
||||
|
@ -105,9 +105,6 @@ public class BasicLookupStrategy implements LookupStrategy {
|
||||
public final static String DEFAULT_ORDER_BY_CLAUSE = ") order by acl_object_identity.object_id_identity"
|
||||
+ " asc, acl_entry.ace_order asc";
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private final AclAuthorizationStrategy aclAuthorizationStrategy;
|
||||
|
||||
private PermissionFactory permissionFactory = new DefaultPermissionFactory();
|
||||
@ -135,9 +132,6 @@ public class BasicLookupStrategy implements LookupStrategy {
|
||||
|
||||
private AclClassIdUtils aclClassIdUtils;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
/**
|
||||
* Constructor accepting mandatory arguments
|
||||
* @param dataSource to access the database
|
||||
@ -171,9 +165,6 @@ public class BasicLookupStrategy implements LookupStrategy {
|
||||
fieldAcl.setAccessible(true);
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
private String computeRepeatingSql(String repeatingSql, int requiredRepetitions) {
|
||||
assert requiredRepetitions > 0 : "requiredRepetitions must be > 0";
|
||||
|
||||
@ -530,9 +521,6 @@ public class BasicLookupStrategy implements LookupStrategy {
|
||||
this.aclClassIdUtils = new AclClassIdUtils(conversionService);
|
||||
}
|
||||
|
||||
// ~ Inner Classes
|
||||
// ==================================================================================================
|
||||
|
||||
private class ProcessResultSet implements ResultSetExtractor<Set<Long>> {
|
||||
|
||||
private final Map<Serializable, Acl> acls;
|
||||
|
@ -46,9 +46,6 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class JdbcAclService implements AclService {
|
||||
|
||||
// ~ Static fields/initializers
|
||||
// =====================================================================================
|
||||
|
||||
protected static final Log log = LogFactory.getLog(JdbcAclService.class);
|
||||
|
||||
private static final String DEFAULT_SELECT_ACL_CLASS_COLUMNS = "class.class as class";
|
||||
@ -70,9 +67,6 @@ public class JdbcAclService implements AclService {
|
||||
+ "and parent.object_id_identity = ? and parent.object_id_class = ("
|
||||
+ "select id FROM acl_class where acl_class.class = ?)";
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
protected final JdbcOperations jdbcOperations;
|
||||
|
||||
private final LookupStrategy lookupStrategy;
|
||||
@ -83,9 +77,6 @@ public class JdbcAclService implements AclService {
|
||||
|
||||
private AclClassIdUtils aclClassIdUtils;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
public JdbcAclService(DataSource dataSource, LookupStrategy lookupStrategy) {
|
||||
this(new JdbcTemplate(dataSource), lookupStrategy);
|
||||
}
|
||||
@ -98,9 +89,6 @@ public class JdbcAclService implements AclService {
|
||||
this.aclClassIdUtils = new AclClassIdUtils();
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public List<ObjectIdentity> findChildren(ObjectIdentity parentIdentity) {
|
||||
Object[] args = { parentIdentity.getIdentifier().toString(), parentIdentity.getType() };
|
||||
List<ObjectIdentity> objects = jdbcOperations.query(findChildrenSql, args, (rs, rowNum) -> {
|
||||
|
@ -63,9 +63,6 @@ public class JdbcMutableAclService extends JdbcAclService implements MutableAclS
|
||||
|
||||
private static final String DEFAULT_INSERT_INTO_ACL_CLASS_WITH_ID = "insert into acl_class (class, class_id_type) values (?, ?)";
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private boolean foreignKeysInDatabase = true;
|
||||
|
||||
private final AclCache aclCache;
|
||||
@ -100,18 +97,12 @@ public class JdbcMutableAclService extends JdbcAclService implements MutableAclS
|
||||
private String updateObjectIdentity = "update acl_object_identity set "
|
||||
+ "parent_object = ?, owner_sid = ?, entries_inheriting = ?" + " where id = ?";
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
public JdbcMutableAclService(DataSource dataSource, LookupStrategy lookupStrategy, AclCache aclCache) {
|
||||
super(dataSource, lookupStrategy);
|
||||
Assert.notNull(aclCache, "AclCache required");
|
||||
this.aclCache = aclCache;
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public MutableAcl createAcl(ObjectIdentity objectIdentity) throws AlreadyExistsException {
|
||||
Assert.notNull(objectIdentity, "Object Identity required");
|
||||
|
||||
|
@ -30,9 +30,6 @@ import java.util.Map;
|
||||
*/
|
||||
public interface LookupStrategy {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
/**
|
||||
* Perform database-specific optimized lookup.
|
||||
* @param objects the identities to lookup (required)
|
||||
|
@ -30,9 +30,6 @@ import java.io.Serializable;
|
||||
*/
|
||||
public interface AccessControlEntry extends Serializable {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
Acl getAcl();
|
||||
|
||||
/**
|
||||
|
@ -27,9 +27,6 @@ import java.io.Serializable;
|
||||
*/
|
||||
public interface AclCache {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
void evictFromCache(Serializable pk);
|
||||
|
||||
void evictFromCache(ObjectIdentity objectIdentity);
|
||||
|
@ -25,9 +25,6 @@ import java.util.Map;
|
||||
*/
|
||||
public interface AclService {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
/**
|
||||
* Locates all object identities that use the specified parent. This is useful for
|
||||
* administration tools.
|
||||
|
@ -22,9 +22,6 @@ package org.springframework.security.acls.model;
|
||||
*/
|
||||
public class AlreadyExistsException extends AclDataAccessException {
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
/**
|
||||
* Constructs an <code>AlreadyExistsException</code> with the specified message.
|
||||
* @param msg the detail message
|
||||
|
@ -23,9 +23,6 @@ package org.springframework.security.acls.model;
|
||||
*/
|
||||
public interface AuditableAccessControlEntry extends AccessControlEntry {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
boolean isAuditFailure();
|
||||
|
||||
boolean isAuditSuccess();
|
||||
|
@ -23,9 +23,6 @@ package org.springframework.security.acls.model;
|
||||
*/
|
||||
public interface AuditableAcl extends MutableAcl {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
void updateAuditing(int aceIndex, boolean auditSuccess, boolean auditFailure);
|
||||
|
||||
}
|
||||
|
@ -22,9 +22,6 @@ package org.springframework.security.acls.model;
|
||||
*/
|
||||
public class ChildrenExistException extends AclDataAccessException {
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
/**
|
||||
* Constructs an <code>ChildrenExistException</code> with the specified message.
|
||||
* @param msg the detail message
|
||||
|
@ -27,9 +27,6 @@ import java.io.Serializable;
|
||||
*/
|
||||
public interface MutableAcl extends Acl {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
void deleteAce(int aceIndex) throws NotFoundException;
|
||||
|
||||
/**
|
||||
|
@ -22,9 +22,6 @@ package org.springframework.security.acls.model;
|
||||
*/
|
||||
public interface MutableAclService extends AclService {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
/**
|
||||
* Creates an empty <code>Acl</code> object in the database. It will have no entries.
|
||||
* The returned object will then be used to add entries.
|
||||
|
@ -22,9 +22,6 @@ package org.springframework.security.acls.model;
|
||||
*/
|
||||
public class NotFoundException extends AclDataAccessException {
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
/**
|
||||
* Constructs an <code>NotFoundException</code> with the specified message.
|
||||
* @param msg the detail message
|
||||
|
@ -33,9 +33,6 @@ import java.io.Serializable;
|
||||
*/
|
||||
public interface ObjectIdentity extends Serializable {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
/**
|
||||
* @param obj to be compared
|
||||
* @return <tt>true</tt> if the objects are equal, <tt>false</tt> otherwise
|
||||
|
@ -25,9 +25,6 @@ package org.springframework.security.acls.model;
|
||||
*/
|
||||
public interface ObjectIdentityRetrievalStrategy {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
ObjectIdentity getObjectIdentity(Object domainObject);
|
||||
|
||||
}
|
||||
|
@ -26,9 +26,6 @@ package org.springframework.security.acls.model;
|
||||
*/
|
||||
public interface OwnershipAcl extends MutableAcl {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
void setOwner(Sid newOwner);
|
||||
|
||||
}
|
||||
|
@ -24,18 +24,12 @@ import java.io.Serializable;
|
||||
*/
|
||||
public interface Permission extends Serializable {
|
||||
|
||||
// ~ Static fields/initializers
|
||||
// =====================================================================================
|
||||
|
||||
char RESERVED_ON = '~';
|
||||
|
||||
char RESERVED_OFF = '.';
|
||||
|
||||
String THIRTY_TWO_RESERVED_OFF = "................................";
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
/**
|
||||
* Returns the bits that represents the permission.
|
||||
* @return the bits that represent the permission
|
||||
|
@ -32,9 +32,6 @@ import java.io.Serializable;
|
||||
*/
|
||||
public interface Sid extends Serializable {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
/**
|
||||
* Refer to the <code>java.lang.Object</code> documentation for the interface
|
||||
* contract.
|
||||
|
@ -28,9 +28,6 @@ import org.springframework.security.core.Authentication;
|
||||
*/
|
||||
public interface SidRetrievalStrategy {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
List<Sid> getSids(Authentication authentication);
|
||||
|
||||
}
|
||||
|
@ -24,9 +24,6 @@ package org.springframework.security.acls.model;
|
||||
*/
|
||||
public class UnloadedSidException extends AclDataAccessException {
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
/**
|
||||
* Constructs an <code>NotFoundException</code> with the specified message.
|
||||
* @param msg the detail message
|
||||
|
@ -29,8 +29,6 @@ import org.springframework.security.acls.model.Permission;
|
||||
*/
|
||||
public class AclFormattingUtilsTests {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
@Test
|
||||
public final void testDemergePatternsParametersConstraints() {
|
||||
try {
|
||||
|
@ -32,9 +32,6 @@ import org.springframework.security.acls.model.Sid;
|
||||
*/
|
||||
public class AccessControlImplEntryTests {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
@Test
|
||||
public void testConstructorRequiredFields() {
|
||||
// Check Acl field is present
|
||||
|
@ -62,9 +62,6 @@ public class AclImplTests {
|
||||
|
||||
private DefaultPermissionFactory permissionFactory;
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
SecurityContextHolder.getContext().setAuthentication(auth);
|
||||
@ -540,9 +537,6 @@ public class AclImplTests {
|
||||
ace.hashCode();
|
||||
}
|
||||
|
||||
// ~ Inner Classes
|
||||
// ==================================================================================================
|
||||
|
||||
private static class MaskPermissionGrantingStrategy extends DefaultPermissionGrantingStrategy {
|
||||
|
||||
MaskPermissionGrantingStrategy(AuditLogger auditLogger) {
|
||||
|
@ -38,9 +38,6 @@ public class AclImplementationSecurityCheckTests {
|
||||
|
||||
private static final String TARGET_CLASS = "org.springframework.security.acls.TargetObject";
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
SecurityContextHolder.clearContext();
|
||||
|
@ -34,8 +34,6 @@ import org.springframework.security.acls.model.AuditableAccessControlEntry;
|
||||
*/
|
||||
public class AuditLoggerTests {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
private PrintStream console;
|
||||
|
||||
private ByteArrayOutputStream bytes = new ByteArrayOutputStream();
|
||||
@ -44,9 +42,6 @@ public class AuditLoggerTests {
|
||||
|
||||
private AuditableAccessControlEntry ace;
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
logger = new ConsoleAuditLogger();
|
||||
|
@ -32,9 +32,6 @@ public class ObjectIdentityImplTests {
|
||||
|
||||
private static final String DOMAIN_CLASS = "org.springframework.security.acls.domain.ObjectIdentityImplTests$MockIdDomainObject";
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
@Test
|
||||
public void constructorsRespectRequiredFields() {
|
||||
// Check one-argument constructor required field
|
||||
@ -177,9 +174,6 @@ public class ObjectIdentityImplTests {
|
||||
assertThat(obj).isNotEqualTo(obj2);
|
||||
}
|
||||
|
||||
// ~ Inner Classes
|
||||
// ==================================================================================================
|
||||
|
||||
private class MockIdDomainObject {
|
||||
|
||||
private Object id;
|
||||
|
@ -28,8 +28,6 @@ import org.springframework.security.acls.model.ObjectIdentityRetrievalStrategy;
|
||||
*/
|
||||
public class ObjectIdentityRetrievalStrategyImplTests {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
@Test
|
||||
public void testObjectIdentityCreation() {
|
||||
MockIdDomainObject domain = new MockIdDomainObject();
|
||||
@ -42,8 +40,6 @@ public class ObjectIdentityRetrievalStrategyImplTests {
|
||||
assertThat(new ObjectIdentityImpl(domain)).isEqualTo(identity);
|
||||
}
|
||||
|
||||
// ~ Inner Classes
|
||||
// ==================================================================================================
|
||||
@SuppressWarnings("unused")
|
||||
private class MockIdDomainObject {
|
||||
|
||||
|
@ -56,16 +56,10 @@ public abstract class AbstractBasicLookupStrategyTests {
|
||||
|
||||
protected static final Long OBJECT_IDENTITY_LONG_AS_UUID = 110L;
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private BasicLookupStrategy strategy;
|
||||
|
||||
private static CacheManager cacheManager;
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public abstract JdbcTemplate getJdbcTemplate();
|
||||
|
||||
public abstract DataSource getDataSource();
|
||||
|
@ -33,9 +33,6 @@ import javax.sql.DataSource;
|
||||
*/
|
||||
public class DatabaseSeeder {
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
public DatabaseSeeder(DataSource dataSource, Resource resource) throws IOException {
|
||||
Assert.notNull(dataSource, "dataSource required");
|
||||
Assert.notNull(resource, "resource required");
|
||||
|
@ -112,9 +112,6 @@ public class JdbcAclServiceTests {
|
||||
assertThat(objectIdentities).isNull();
|
||||
}
|
||||
|
||||
// ~ Some integration tests
|
||||
// ========================================================================================================
|
||||
|
||||
@Test
|
||||
public void findChildrenWithoutIdType() {
|
||||
ObjectIdentity objectIdentity = new ObjectIdentityImpl(MockLongIdDomainObject.class, 4711L);
|
||||
|
@ -64,18 +64,12 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
@ContextConfiguration(locations = { "/jdbcMutableAclServiceTests-context.xml" })
|
||||
public class JdbcMutableAclServiceTests extends AbstractTransactionalJUnit4SpringContextTests {
|
||||
|
||||
// ~ Constant fields
|
||||
// ================================================================================================
|
||||
|
||||
private static final String TARGET_CLASS = TargetObject.class.getName();
|
||||
|
||||
private final Authentication auth = new TestingAuthenticationToken("ben", "ignored", "ROLE_ADMINISTRATOR");
|
||||
|
||||
public static final String SELECT_ALL_CLASSES = "SELECT * FROM acl_class WHERE class = ?";
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private final ObjectIdentity topParentOid = new ObjectIdentityImpl(TARGET_CLASS, 100L);
|
||||
|
||||
private final ObjectIdentity middleParentOid = new ObjectIdentityImpl(TARGET_CLASS, 101L);
|
||||
@ -97,9 +91,6 @@ public class JdbcMutableAclServiceTests extends AbstractTransactionalJUnit4Sprin
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
protected String getSqlClassPathResource() {
|
||||
return "createAclSchema.sql";
|
||||
}
|
||||
|
@ -42,9 +42,6 @@ public class SidRetrievalStrategyTests {
|
||||
|
||||
Authentication authentication = new TestingAuthenticationToken("scott", "password", "A", "B", "C");
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
@Test
|
||||
public void correctSidsAreRetrieved() {
|
||||
SidRetrievalStrategy retrStrategy = new SidRetrievalStrategyImpl();
|
||||
|
@ -34,8 +34,6 @@ import java.util.Collections;
|
||||
|
||||
public class SidTests {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
@Test
|
||||
public void testPrincipalSidConstructorsRequiredFields() {
|
||||
// Check one String-argument constructor
|
||||
|
@ -34,9 +34,6 @@ public class ServiceProperties implements InitializingBean {
|
||||
|
||||
public static final String DEFAULT_CAS_SERVICE_PARAMETER = "service";
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private String service;
|
||||
|
||||
private boolean authenticateAllArtifacts;
|
||||
@ -47,9 +44,6 @@ public class ServiceProperties implements InitializingBean {
|
||||
|
||||
private String serviceParameter = DEFAULT_CAS_SERVICE_PARAMETER;
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public void afterPropertiesSet() {
|
||||
Assert.hasLength(this.service, "service cannot be empty.");
|
||||
Assert.hasLength(this.artifactParameter, "artifactParameter cannot be empty.");
|
||||
|
@ -56,14 +56,8 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class CasAuthenticationProvider implements AuthenticationProvider, InitializingBean, MessageSourceAware {
|
||||
|
||||
// ~ Static fields/initializers
|
||||
// =====================================================================================
|
||||
|
||||
private static final Log logger = LogFactory.getLog(CasAuthenticationProvider.class);
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private AuthenticationUserDetailsService<CasAssertionAuthenticationToken> authenticationUserDetailsService;
|
||||
|
||||
private final UserDetailsChecker userDetailsChecker = new AccountStatusUserDetailsChecker();
|
||||
@ -80,9 +74,6 @@ public class CasAuthenticationProvider implements AuthenticationProvider, Initia
|
||||
|
||||
private GrantedAuthoritiesMapper authoritiesMapper = new NullAuthoritiesMapper();
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public void afterPropertiesSet() {
|
||||
Assert.notNull(this.authenticationUserDetailsService, "An authenticationUserDetailsService must be set");
|
||||
Assert.notNull(this.ticketValidator, "A ticketValidator must be set");
|
||||
|
@ -36,8 +36,6 @@ public class CasAuthenticationToken extends AbstractAuthenticationToken implemen
|
||||
|
||||
private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID;
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
private final Object credentials;
|
||||
|
||||
private final Object principal;
|
||||
@ -48,9 +46,6 @@ public class CasAuthenticationToken extends AbstractAuthenticationToken implemen
|
||||
|
||||
private final Assertion assertion;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param key to identify if this object made by a given
|
||||
@ -110,9 +105,6 @@ public class CasAuthenticationToken extends AbstractAuthenticationToken implemen
|
||||
setAuthenticated(true);
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
private static Integer extractKeyHash(String key) {
|
||||
Assert.hasLength(key, "key cannot be null or empty");
|
||||
return key.hashCode();
|
||||
|
@ -32,19 +32,10 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class EhCacheBasedTicketCache implements StatelessTicketCache, InitializingBean {
|
||||
|
||||
// ~ Static fields/initializers
|
||||
// =====================================================================================
|
||||
|
||||
private static final Log logger = LogFactory.getLog(EhCacheBasedTicketCache.class);
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private Ehcache cache;
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public void afterPropertiesSet() {
|
||||
Assert.notNull(cache, "cache mandatory");
|
||||
}
|
||||
|
@ -29,27 +29,15 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class SpringCacheBasedTicketCache implements StatelessTicketCache {
|
||||
|
||||
// ~ Static fields/initializers
|
||||
// =====================================================================================
|
||||
|
||||
private static final Log logger = LogFactory.getLog(SpringCacheBasedTicketCache.class);
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private final Cache cache;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
public SpringCacheBasedTicketCache(Cache cache) {
|
||||
Assert.notNull(cache, "cache mandatory");
|
||||
this.cache = cache;
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public CasAuthenticationToken getByTicketId(final String serviceTicket) {
|
||||
final Cache.ValueWrapper element = serviceTicket != null ? cache.get(serviceTicket) : null;
|
||||
|
||||
|
@ -60,8 +60,6 @@ package org.springframework.security.cas.authentication;
|
||||
*/
|
||||
public interface StatelessTicketCache {
|
||||
|
||||
// ~ Methods ================================================================
|
||||
|
||||
/**
|
||||
* Retrieves the <code>CasAuthenticationToken</code> associated with the specified
|
||||
* ticket.
|
||||
|
@ -44,8 +44,6 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class CasAuthenticationEntryPoint implements AuthenticationEntryPoint, InitializingBean {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
private ServiceProperties serviceProperties;
|
||||
|
||||
private String loginUrl;
|
||||
@ -61,9 +59,6 @@ public class CasAuthenticationEntryPoint implements AuthenticationEntryPoint, In
|
||||
*/
|
||||
private boolean encodeServiceUrlWithSessionId = true;
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public void afterPropertiesSet() {
|
||||
Assert.hasLength(this.loginUrl, "loginUrl must be specified");
|
||||
Assert.notNull(this.serviceProperties, "serviceProperties must be specified");
|
||||
|
@ -173,9 +173,6 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class CasAuthenticationFilter extends AbstractAuthenticationProcessingFilter {
|
||||
|
||||
// ~ Static fields/initializers
|
||||
// =====================================================================================
|
||||
|
||||
/**
|
||||
* Used to identify a CAS request for a stateful user agent, such as a web browser.
|
||||
*/
|
||||
@ -205,17 +202,11 @@ public class CasAuthenticationFilter extends AbstractAuthenticationProcessingFil
|
||||
|
||||
private AuthenticationFailureHandler proxyFailureHandler = new SimpleUrlAuthenticationFailureHandler();
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
public CasAuthenticationFilter() {
|
||||
super("/login/cas");
|
||||
setAuthenticationFailureHandler(new SimpleUrlAuthenticationFailureHandler());
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
@Override
|
||||
protected final void successfulAuthentication(HttpServletRequest request, HttpServletResponse response,
|
||||
FilterChain chain, Authentication authResult) throws IOException, ServletException {
|
||||
|
@ -37,14 +37,8 @@ final class DefaultServiceAuthenticationDetails extends WebAuthenticationDetails
|
||||
|
||||
private static final long serialVersionUID = 6192409090610517700L;
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private final String serviceUrl;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
* @param request the current {@link HttpServletRequest} to obtain the
|
||||
@ -63,9 +57,6 @@ final class DefaultServiceAuthenticationDetails extends WebAuthenticationDetails
|
||||
request.getRequestURI(), query);
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
/**
|
||||
* Returns the current URL minus the artifact parameter and its value, if present.
|
||||
* @see org.springframework.security.cas.web.authentication.ServiceAuthenticationDetails#getServiceUrl()
|
||||
|
@ -37,16 +37,10 @@ import org.springframework.util.Assert;
|
||||
public class ServiceAuthenticationDetailsSource
|
||||
implements AuthenticationDetailsSource<HttpServletRequest, ServiceAuthenticationDetails> {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private final Pattern artifactPattern;
|
||||
|
||||
private ServiceProperties serviceProperties;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
/**
|
||||
* Creates an implementation that uses the specified ServiceProperties and the default
|
||||
* CAS artifactParameterName.
|
||||
@ -69,9 +63,6 @@ public class ServiceAuthenticationDetailsSource
|
||||
this.artifactPattern = DefaultServiceAuthenticationDetails.createArtifactPattern(artifactParameterName);
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
/**
|
||||
* @param context the {@code HttpServletRequest} object.
|
||||
* @return the {@code ServiceAuthenticationDetails} containing information about the
|
||||
|
@ -50,9 +50,6 @@ import java.util.*;
|
||||
@SuppressWarnings("unchecked")
|
||||
public class CasAuthenticationProviderTests {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
private UserDetails makeUserDetails() {
|
||||
return new User("user", "password", true, true, true, true,
|
||||
AuthorityUtils.createAuthorityList("ROLE_ONE", "ROLE_TWO"));
|
||||
@ -372,9 +369,6 @@ public class CasAuthenticationProviderTests {
|
||||
assertThat(cap.supports(CasAuthenticationToken.class)).isTrue();
|
||||
}
|
||||
|
||||
// ~ Inner Classes
|
||||
// ==================================================================================================
|
||||
|
||||
private class MockAuthoritiesPopulator implements AuthenticationUserDetailsService {
|
||||
|
||||
public UserDetails loadUserDetails(final Authentication token) throws UsernameNotFoundException {
|
||||
|
@ -37,8 +37,6 @@ public class EhCacheBasedTicketCacheTests extends AbstractStatelessTicketCacheTe
|
||||
|
||||
private static CacheManager cacheManager;
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
@BeforeClass
|
||||
public static void initCacheManaer() {
|
||||
cacheManager = CacheManager.create();
|
||||
|
@ -34,9 +34,6 @@ public class SpringCacheBasedTicketCacheTests extends AbstractStatelessTicketCac
|
||||
|
||||
private static CacheManager cacheManager;
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
@BeforeClass
|
||||
public static void initCacheManaer() {
|
||||
cacheManager = new ConcurrentMapCacheManager();
|
||||
|
@ -33,8 +33,6 @@ import org.springframework.security.cas.ServiceProperties;
|
||||
*/
|
||||
public class CasAuthenticationEntryPointTests {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
@Test
|
||||
public void testDetectsMissingLoginFormUrl() throws Exception {
|
||||
CasAuthenticationEntryPoint ep = new CasAuthenticationEntryPoint();
|
||||
|
@ -45,9 +45,6 @@ import static org.mockito.Mockito.*;
|
||||
*/
|
||||
public class CasAuthenticationFilterTests {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
@After
|
||||
public void tearDown() {
|
||||
SecurityContextHolder.clearContext();
|
||||
|
@ -29,9 +29,6 @@ import org.springframework.security.cas.ServiceProperties;
|
||||
*/
|
||||
public class ServicePropertiesTests {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void detectsMissingService() throws Exception {
|
||||
ServiceProperties sp = new ServiceProperties();
|
||||
|
@ -28,9 +28,6 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class DataSourcePopulator implements InitializingBean {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
JdbcTemplate template;
|
||||
|
||||
public void afterPropertiesSet() {
|
||||
|
@ -53,9 +53,6 @@ public class FilterChainProxyConfigTests {
|
||||
|
||||
private ClassPathXmlApplicationContext appCtx;
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
@Before
|
||||
public void loadContext() {
|
||||
System.setProperty("sec1235.pattern1", "/login");
|
||||
|
@ -28,9 +28,6 @@ import org.springframework.security.core.Authentication;
|
||||
*/
|
||||
public interface AccessDecisionManager {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
/**
|
||||
* Resolves an access control decision for the passed parameters.
|
||||
* @param authentication the caller invoking the method (not null)
|
||||
|
@ -31,18 +31,12 @@ import org.springframework.security.core.Authentication;
|
||||
*/
|
||||
public interface AccessDecisionVoter<S> {
|
||||
|
||||
// ~ Static fields/initializers
|
||||
// =====================================================================================
|
||||
|
||||
int ACCESS_GRANTED = 1;
|
||||
|
||||
int ACCESS_ABSTAIN = 0;
|
||||
|
||||
int ACCESS_DENIED = -1;
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
/**
|
||||
* Indicates whether this {@code AccessDecisionVoter} is able to vote on the passed
|
||||
* {@code ConfigAttribute}.
|
||||
|
@ -24,9 +24,6 @@ package org.springframework.security.access;
|
||||
*/
|
||||
public class AccessDeniedException extends RuntimeException {
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
/**
|
||||
* Constructs an <code>AccessDeniedException</code> with the specified message.
|
||||
* @param msg the detail message
|
||||
|
@ -29,9 +29,6 @@ import org.springframework.security.core.Authentication;
|
||||
*/
|
||||
public interface AfterInvocationProvider {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
Object decide(Authentication authentication, Object object, Collection<ConfigAttribute> attributes,
|
||||
Object returnedObject) throws AccessDeniedException;
|
||||
|
||||
|
@ -26,9 +26,6 @@ package org.springframework.security.access;
|
||||
*/
|
||||
public class AuthorizationServiceException extends AccessDeniedException {
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
/**
|
||||
* Constructs an <code>AuthorizationServiceException</code> with the specified
|
||||
* message.
|
||||
|
@ -38,9 +38,6 @@ import org.springframework.security.access.intercept.RunAsManager;
|
||||
*/
|
||||
public interface ConfigAttribute extends Serializable {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
/**
|
||||
* If the <code>ConfigAttribute</code> can be represented as a <code>String</code> and
|
||||
* that <code>String</code> is sufficient in precision to be relied upon as a
|
||||
|
@ -29,22 +29,13 @@ import org.springframework.util.StringUtils;
|
||||
*/
|
||||
public class SecurityConfig implements ConfigAttribute {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private final String attrib;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
public SecurityConfig(String config) {
|
||||
Assert.hasText(config, "You must provide a configuration attribute");
|
||||
this.attrib = config;
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof ConfigAttribute) {
|
||||
|
@ -29,9 +29,6 @@ import org.springframework.security.access.intercept.AbstractSecurityInterceptor
|
||||
*/
|
||||
public interface SecurityMetadataSource extends AopInfrastructureBean {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
/**
|
||||
* Accesses the {@code ConfigAttribute}s that apply to a given secure object.
|
||||
* @param object the object being secured
|
||||
|
@ -25,9 +25,6 @@ import org.springframework.context.ApplicationEvent;
|
||||
*/
|
||||
public abstract class AbstractAuthorizationEvent extends ApplicationEvent {
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
/**
|
||||
* Construct the event, passing in the secure object being intercepted.
|
||||
* @param secureObject the secure object
|
||||
|
@ -29,16 +29,10 @@ import org.springframework.security.authentication.AuthenticationCredentialsNotF
|
||||
*/
|
||||
public class AuthenticationCredentialsNotFoundEvent extends AbstractAuthorizationEvent {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private AuthenticationCredentialsNotFoundException credentialsNotFoundException;
|
||||
|
||||
private Collection<ConfigAttribute> configAttribs;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
/**
|
||||
* Construct the event.
|
||||
* @param secureObject the secure object
|
||||
@ -59,9 +53,6 @@ public class AuthenticationCredentialsNotFoundEvent extends AbstractAuthorizatio
|
||||
this.credentialsNotFoundException = credentialsNotFoundException;
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public Collection<ConfigAttribute> getConfigAttributes() {
|
||||
return configAttribs;
|
||||
}
|
||||
|
@ -36,18 +36,12 @@ import org.springframework.security.core.Authentication;
|
||||
*/
|
||||
public class AuthorizationFailureEvent extends AbstractAuthorizationEvent {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private AccessDeniedException accessDeniedException;
|
||||
|
||||
private Authentication authentication;
|
||||
|
||||
private Collection<ConfigAttribute> configAttributes;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
/**
|
||||
* Construct the event.
|
||||
* @param secureObject the secure object
|
||||
@ -70,9 +64,6 @@ public class AuthorizationFailureEvent extends AbstractAuthorizationEvent {
|
||||
this.accessDeniedException = accessDeniedException;
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public AccessDeniedException getAccessDeniedException() {
|
||||
return accessDeniedException;
|
||||
}
|
||||
|
@ -31,16 +31,10 @@ import org.springframework.security.core.Authentication;
|
||||
*/
|
||||
public class AuthorizedEvent extends AbstractAuthorizationEvent {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private Authentication authentication;
|
||||
|
||||
private Collection<ConfigAttribute> configAttributes;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
/**
|
||||
* Construct the event.
|
||||
* @param secureObject the secure object
|
||||
@ -59,9 +53,6 @@ public class AuthorizedEvent extends AbstractAuthorizationEvent {
|
||||
this.authentication = authentication;
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public Authentication getAuthentication() {
|
||||
return authentication;
|
||||
}
|
||||
|
@ -31,14 +31,8 @@ import org.springframework.context.ApplicationListener;
|
||||
*/
|
||||
public class LoggerListener implements ApplicationListener<AbstractAuthorizationEvent> {
|
||||
|
||||
// ~ Static fields/initializers
|
||||
// =====================================================================================
|
||||
|
||||
private static final Log logger = LogFactory.getLog(LoggerListener.class);
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public void onApplicationEvent(AbstractAuthorizationEvent event) {
|
||||
if (event instanceof AuthenticationCredentialsNotFoundEvent) {
|
||||
AuthenticationCredentialsNotFoundEvent authEvent = (AuthenticationCredentialsNotFoundEvent) event;
|
||||
|
@ -31,9 +31,6 @@ package org.springframework.security.access.event;
|
||||
*/
|
||||
public class PublicInvocationEvent extends AbstractAuthorizationEvent {
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
/**
|
||||
* Construct the event, passing in the public secure object.
|
||||
* @param secureObject the public secure object
|
||||
|
@ -104,14 +104,8 @@ import org.springframework.util.Assert;
|
||||
public abstract class AbstractSecurityInterceptor
|
||||
implements InitializingBean, ApplicationEventPublisherAware, MessageSourceAware {
|
||||
|
||||
// ~ Static fields/initializers
|
||||
// =====================================================================================
|
||||
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
protected MessageSourceAccessor messages = SpringSecurityMessageSource.getAccessor();
|
||||
|
||||
private ApplicationEventPublisher eventPublisher;
|
||||
@ -132,9 +126,6 @@ public abstract class AbstractSecurityInterceptor
|
||||
|
||||
private boolean publishAuthorizationSuccess = false;
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public void afterPropertiesSet() {
|
||||
Assert.notNull(getSecureObjectClass(), "Subclass must provide a non-null response to getSecureObjectClass()");
|
||||
Assert.notNull(this.messages, "A message source must be set");
|
||||
|
@ -44,9 +44,6 @@ import org.springframework.security.core.Authentication;
|
||||
*/
|
||||
public interface AfterInvocationManager {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
/**
|
||||
* Given the details of a secure object invocation including its returned
|
||||
* <code>Object</code>, make an access control decision or optionally modify the
|
||||
|
@ -47,19 +47,10 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class AfterInvocationProviderManager implements AfterInvocationManager, InitializingBean {
|
||||
|
||||
// ~ Static fields/initializers
|
||||
// =====================================================================================
|
||||
|
||||
protected static final Log logger = LogFactory.getLog(AfterInvocationProviderManager.class);
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private List<AfterInvocationProvider> providers;
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public void afterPropertiesSet() {
|
||||
checkIfValidList(this.providers);
|
||||
}
|
||||
|
@ -32,9 +32,6 @@ import org.springframework.security.core.context.SecurityContext;
|
||||
*/
|
||||
public class InterceptorStatusToken {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private SecurityContext securityContext;
|
||||
|
||||
private Collection<ConfigAttribute> attr;
|
||||
@ -43,9 +40,6 @@ public class InterceptorStatusToken {
|
||||
|
||||
private boolean contextHolderRefreshRequired;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
public InterceptorStatusToken(SecurityContext securityContext, boolean contextHolderRefreshRequired,
|
||||
Collection<ConfigAttribute> attributes, Object secureObject) {
|
||||
this.securityContext = securityContext;
|
||||
@ -54,9 +48,6 @@ public class InterceptorStatusToken {
|
||||
this.secureObject = secureObject;
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public Collection<ConfigAttribute> getAttributes() {
|
||||
return attr;
|
||||
}
|
||||
|
@ -44,19 +44,10 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class MethodInvocationPrivilegeEvaluator implements InitializingBean {
|
||||
|
||||
// ~ Static fields/initializers
|
||||
// =====================================================================================
|
||||
|
||||
protected static final Log logger = LogFactory.getLog(MethodInvocationPrivilegeEvaluator.class);
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private AbstractSecurityInterceptor securityInterceptor;
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public void afterPropertiesSet() {
|
||||
Assert.notNull(securityInterceptor, "SecurityInterceptor required");
|
||||
}
|
||||
|
@ -31,9 +31,6 @@ import org.springframework.security.core.Authentication;
|
||||
*/
|
||||
final class NullRunAsManager implements RunAsManager {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public Authentication buildRunAs(Authentication authentication, Object object, Collection<ConfigAttribute> config) {
|
||||
return null;
|
||||
}
|
||||
|
@ -45,16 +45,10 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class RunAsImplAuthenticationProvider implements InitializingBean, AuthenticationProvider, MessageSourceAware {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
protected MessageSourceAccessor messages = SpringSecurityMessageSource.getAccessor();
|
||||
|
||||
private String key;
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public void afterPropertiesSet() {
|
||||
Assert.notNull(key, "A Key is required and should match that configured for the RunAsManagerImpl");
|
||||
}
|
||||
|
@ -60,9 +60,6 @@ import org.springframework.security.core.Authentication;
|
||||
*/
|
||||
public interface RunAsManager {
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
/**
|
||||
* Returns a replacement <code>Authentication</code> object for the current secure
|
||||
* object invocation, or <code>null</code> if replacement not required.
|
||||
|
@ -55,16 +55,10 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class RunAsManagerImpl implements RunAsManager, InitializingBean {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private String key;
|
||||
|
||||
private String rolePrefix = "ROLE_";
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public void afterPropertiesSet() {
|
||||
Assert.notNull(key,
|
||||
"A Key is required and should match that configured for the RunAsImplAuthenticationProvider");
|
||||
|
@ -33,9 +33,6 @@ public class RunAsUserToken extends AbstractAuthenticationToken {
|
||||
|
||||
private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID;
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private final Class<? extends Authentication> originalAuthentication;
|
||||
|
||||
private final Object credentials;
|
||||
@ -44,9 +41,6 @@ public class RunAsUserToken extends AbstractAuthenticationToken {
|
||||
|
||||
private final int keyHash;
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
public RunAsUserToken(String key, Object principal, Object credentials,
|
||||
Collection<? extends GrantedAuthority> authorities,
|
||||
Class<? extends Authentication> originalAuthentication) {
|
||||
@ -58,9 +52,6 @@ public class RunAsUserToken extends AbstractAuthenticationToken {
|
||||
setAuthenticated(true);
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
@Override
|
||||
public Object getCredentials() {
|
||||
return this.credentials;
|
||||
|
@ -39,14 +39,8 @@ import org.aopalliance.intercept.MethodInvocation;
|
||||
*/
|
||||
public class MethodSecurityInterceptor extends AbstractSecurityInterceptor implements MethodInterceptor {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private MethodSecurityMetadataSource securityMetadataSource;
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public Class<?> getSecureObjectClass() {
|
||||
return MethodInvocation.class;
|
||||
}
|
||||
|
@ -53,9 +53,6 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class MethodSecurityMetadataSourceAdvisor extends AbstractPointcutAdvisor implements BeanFactoryAware {
|
||||
|
||||
// ~ Instance fields
|
||||
// ================================================================================================
|
||||
|
||||
private transient MethodSecurityMetadataSource attributeSource;
|
||||
|
||||
private transient MethodInterceptor interceptor;
|
||||
@ -70,9 +67,6 @@ public class MethodSecurityMetadataSourceAdvisor extends AbstractPointcutAdvisor
|
||||
|
||||
private transient volatile Object adviceMonitor = new Object();
|
||||
|
||||
// ~ Constructors
|
||||
// ===================================================================================================
|
||||
|
||||
/**
|
||||
* Alternative constructor for situations where we want the advisor decoupled from the
|
||||
* advice. Instead the advice bean name should be set. This prevents eager
|
||||
@ -96,9 +90,6 @@ public class MethodSecurityMetadataSourceAdvisor extends AbstractPointcutAdvisor
|
||||
this.metadataSourceBeanName = attributeSourceBeanName;
|
||||
}
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
public Pointcut getPointcut() {
|
||||
return pointcut;
|
||||
}
|
||||
@ -124,9 +115,6 @@ public class MethodSecurityMetadataSourceAdvisor extends AbstractPointcutAdvisor
|
||||
attributeSource = beanFactory.getBean(metadataSourceBeanName, MethodSecurityMetadataSource.class);
|
||||
}
|
||||
|
||||
// ~ Inner Classes
|
||||
// ==================================================================================================
|
||||
|
||||
class MethodSecurityMetadataSourcePointcut extends StaticMethodMatcherPointcut implements Serializable {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user