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