1
2
3
4
5
6
7 package org.mule.module.acegi;
8
9 import org.mule.api.security.Authentication;
10
11 import java.util.Map;
12
13 import org.acegisecurity.GrantedAuthority;
14
15
16
17
18 public class AcegiAuthenticationAdapter implements Authentication
19 {
20 private org.acegisecurity.Authentication delegate;
21 private Map properties;
22
23 public AcegiAuthenticationAdapter(org.acegisecurity.Authentication authentication)
24 {
25 this.delegate = authentication;
26 }
27
28 public AcegiAuthenticationAdapter(org.acegisecurity.Authentication authentication, Map properties)
29 {
30 this.delegate = authentication;
31 this.properties = properties;
32 }
33
34 public void setAuthenticated(boolean b)
35 {
36 delegate.setAuthenticated(b);
37 }
38
39 public boolean isAuthenticated()
40 {
41 return delegate.isAuthenticated();
42 }
43
44 public GrantedAuthority[] getAuthorities()
45 {
46 return delegate.getAuthorities();
47 }
48
49 public Object getCredentials()
50 {
51 return delegate.getCredentials();
52 }
53
54 public Object getDetails()
55 {
56 return delegate.getDetails();
57 }
58
59 public Object getPrincipal()
60 {
61 return delegate.getPrincipal();
62 }
63
64 public int hashCode()
65 {
66 return delegate.hashCode();
67 }
68
69 public boolean equals(Object another)
70 {
71 return delegate.equals(another);
72 }
73
74 public String getName()
75 {
76 return delegate.getName();
77 }
78
79 public org.acegisecurity.Authentication getDelegate()
80 {
81 return delegate;
82 }
83
84 public Map getProperties()
85 {
86 return properties;
87 }
88
89 public void setProperties(Map properties)
90 {
91 this.properties = properties;
92 }
93 }