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.lifecycle.InitialisationException;
15 import org.mule.api.security.AuthenticationFilter;
16 import org.mule.api.security.CredentialsAccessor;
17 import org.mule.api.security.CryptoFailureException;
18 import org.mule.api.security.EncryptionStrategyNotFoundException;
19 import org.mule.api.security.SecurityException;
20 import org.mule.api.security.SecurityProviderNotFoundException;
21 import org.mule.api.security.UnknownAuthenticationTypeException;
22
23
24
25
26
27 public abstract class AbstractAuthenticationFilter extends AbstractSecurityFilter implements AuthenticationFilter
28 {
29 private boolean authenticate;
30 private CredentialsAccessor credentialsAccessor;
31
32 public CredentialsAccessor getCredentialsAccessor()
33 {
34 return credentialsAccessor;
35 }
36
37 public void setCredentialsAccessor(CredentialsAccessor credentialsAccessor)
38 {
39 this.credentialsAccessor = credentialsAccessor;
40 }
41 public boolean isAuthenticate()
42 {
43 return authenticate;
44 }
45
46 public void setAuthenticate(boolean authenticate)
47 {
48 this.authenticate = authenticate;
49 }
50
51 @Override
52 public void doFilter(MuleEvent event)
53 throws SecurityException, UnknownAuthenticationTypeException, CryptoFailureException,
54 SecurityProviderNotFoundException, EncryptionStrategyNotFoundException, InitialisationException
55 {
56 authenticate(event);
57 }
58
59 public abstract void authenticate(MuleEvent event)
60 throws SecurityException, UnknownAuthenticationTypeException, CryptoFailureException,
61 SecurityProviderNotFoundException, EncryptionStrategyNotFoundException,
62 InitialisationException;
63
64 }