1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.acegisecurity.securechannel;
17
18 import org.acegisecurity.ConfigAttribute;
19 import org.acegisecurity.ConfigAttributeDefinition;
20 import org.acegisecurity.intercept.web.FilterInvocation;
21
22 import java.io.IOException;
23
24 import javax.servlet.ServletException;
25
26
27 /***
28 * Decides whether a web channel provides sufficient security.
29 *
30 * <P>
31 * If necessary due to the nature of the redirection, implementations should
32 * store the original destination of the request in {@link
33 * org.acegisecurity.ui.AbstractProcessingFilter#ACEGI_SECURITY_TARGET_URL_KEY}.
34 * </p>
35 *
36 * @author Ben Alex
37 * @version $Id: ChannelDecisionManager.java,v 1.4 2005/11/17 00:55:50 benalex Exp $
38 */
39 public interface ChannelDecisionManager {
40
41
42 /***
43 * Decided whether the presented {@link FilterInvocation} provides the
44 * appropriate level of channel security based on the requested {@link
45 * ConfigAttributeDefinition}.
46 */
47 public void decide(FilterInvocation invocation,
48 ConfigAttributeDefinition config) throws IOException, ServletException;
49
50 /***
51 * Indicates whether this <code>ChannelDecisionManager</code> is able to
52 * process the passed <code>ConfigAttribute</code>.
53 *
54 * <p>
55 * This allows the <code>ChannelProcessingFilter</code> to check every
56 * configuration attribute can be consumed by the configured
57 * <code>ChannelDecisionManager</code>.
58 * </p>
59 *
60 * @param attribute a configuration attribute that has been configured
61 * against the <code>ChannelProcessingFilter</code>
62 *
63 * @return true if this <code>ChannelDecisionManager</code> can support the
64 * passed configuration attribute
65 */
66 public boolean supports(ConfigAttribute attribute);
67 }