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