1
2
3
4
5
6
7
8
9
10
11 package org.mule.security;
12
13 import org.mule.api.MuleEvent;
14 import org.mule.api.endpoint.ImmutableEndpoint;
15 import org.mule.api.endpoint.InboundEndpoint;
16 import org.mule.api.lifecycle.InitialisationException;
17 import org.mule.api.security.CryptoFailureException;
18 import org.mule.api.security.EncryptionStrategyNotFoundException;
19 import org.mule.api.security.EndpointSecurityFilter;
20 import org.mule.api.security.SecurityException;
21 import org.mule.api.security.SecurityProviderNotFoundException;
22 import org.mule.api.security.UnknownAuthenticationTypeException;
23
24
25
26
27
28 @Deprecated
29 public abstract class AbstractEndpointSecurityFilter extends AbstractAuthenticationFilter
30 implements EndpointSecurityFilter
31 {
32 protected ImmutableEndpoint endpoint;
33
34 public ImmutableEndpoint getEndpoint()
35 {
36 return endpoint;
37 }
38
39 public synchronized void setEndpoint(ImmutableEndpoint endpoint)
40 {
41 this.endpoint = endpoint;
42 }
43
44 @Override
45 public void doFilter(MuleEvent event)
46 throws SecurityException, UnknownAuthenticationTypeException, CryptoFailureException,
47 SecurityProviderNotFoundException, EncryptionStrategyNotFoundException, InitialisationException
48 {
49 super.doFilter(event);
50 }
51
52 public void authenticate(MuleEvent event)
53 throws SecurityException, UnknownAuthenticationTypeException, CryptoFailureException,
54 SecurityProviderNotFoundException, EncryptionStrategyNotFoundException, InitialisationException
55 {
56 if (endpoint == null || endpoint instanceof InboundEndpoint)
57 {
58 authenticateInbound(event);
59 }
60 else
61 {
62 authenticateOutbound(event);
63 }
64 }
65
66 protected abstract void authenticateInbound(MuleEvent event)
67 throws SecurityException, CryptoFailureException, SecurityProviderNotFoundException,
68 EncryptionStrategyNotFoundException, UnknownAuthenticationTypeException;
69
70 protected abstract void authenticateOutbound(MuleEvent event)
71 throws SecurityException, SecurityProviderNotFoundException, CryptoFailureException;
72
73 }