public int vote(Authentication authentication, Object object,
			Collection<ConfigAttribute> definition) {
		boolean jsr250AttributeFound = false;

		for (ConfigAttribute attribute : definition) {
			if (Jsr250SecurityConfig.PERMIT_ALL_ATTRIBUTE.equals(attribute)) {
				return ACCESS_GRANTED;
			}

			if (Jsr250SecurityConfig.DENY_ALL_ATTRIBUTE.equals(attribute)) {
				return ACCESS_DENIED;
			}

			if (supports(attribute)) {
				jsr250AttributeFound = true;
				// Attempt to find a matching granted authority
				for (GrantedAuthority authority : authentication.getAuthorities()) {
					if (attribute.getAttribute().equals(authority.getAuthority())) {
						return ACCESS_GRANTED;
					}
				}
			}
		}

		return jsr250AttributeFound ? ACCESS_DENIED : ACCESS_ABSTAIN;
	}