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 | 0 | { |
30 | 0 | this.delegate = authentication; |
31 | 0 | } |
32 | |
|
33 | |
public AcegiAuthenticationAdapter(Authentication authentication, Map properties) |
34 | 0 | { |
35 | 0 | this.delegate = authentication; |
36 | 0 | this.properties = properties; |
37 | 0 | } |
38 | |
|
39 | |
public void setAuthenticated(boolean b) |
40 | |
{ |
41 | 0 | delegate.setAuthenticated(b); |
42 | 0 | } |
43 | |
|
44 | |
public boolean isAuthenticated() |
45 | |
{ |
46 | 0 | return delegate.isAuthenticated(); |
47 | |
} |
48 | |
|
49 | |
public GrantedAuthority[] getAuthorities() |
50 | |
{ |
51 | 0 | return delegate.getAuthorities(); |
52 | |
} |
53 | |
|
54 | |
public Object getCredentials() |
55 | |
{ |
56 | 0 | return delegate.getCredentials(); |
57 | |
} |
58 | |
|
59 | |
public Object getDetails() |
60 | |
{ |
61 | 0 | return delegate.getDetails(); |
62 | |
} |
63 | |
|
64 | |
public Object getPrincipal() |
65 | |
{ |
66 | 0 | return delegate.getPrincipal(); |
67 | |
} |
68 | |
|
69 | |
public int hashCode() |
70 | |
{ |
71 | 0 | return delegate.hashCode(); |
72 | |
} |
73 | |
|
74 | |
public boolean equals(Object another) |
75 | |
{ |
76 | 0 | return delegate.equals(another); |
77 | |
} |
78 | |
|
79 | |
public String getName() |
80 | |
{ |
81 | 0 | return delegate.getName(); |
82 | |
} |
83 | |
|
84 | |
public Authentication getDelegate() |
85 | |
{ |
86 | 0 | return delegate; |
87 | |
} |
88 | |
|
89 | |
public Map getProperties() |
90 | |
{ |
91 | 0 | return properties; |
92 | |
} |
93 | |
|
94 | |
public void setProperties(Map properties) |
95 | |
{ |
96 | 0 | this.properties = properties; |
97 | 0 | } |
98 | |
} |