1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
package org.mule.impl.security; |
12 | |
|
13 | |
import org.mule.umo.security.UMOAuthentication; |
14 | |
import org.mule.umo.security.UMOCredentials; |
15 | |
|
16 | |
import java.util.Map; |
17 | |
|
18 | |
public class MuleAuthentication implements UMOAuthentication |
19 | |
{ |
20 | |
private boolean authenticated; |
21 | |
private char[] credentials; |
22 | |
private String user; |
23 | |
private Map properties; |
24 | |
|
25 | |
public MuleAuthentication(UMOCredentials credentials) |
26 | 0 | { |
27 | 0 | this.user = credentials.getUsername(); |
28 | 0 | this.credentials = credentials.getPassword(); |
29 | 0 | } |
30 | |
|
31 | |
public void setAuthenticated(boolean b) |
32 | |
{ |
33 | 0 | authenticated = b; |
34 | 0 | } |
35 | |
|
36 | |
public boolean isAuthenticated() |
37 | |
{ |
38 | 0 | return authenticated; |
39 | |
} |
40 | |
|
41 | |
public Object getCredentials() |
42 | |
{ |
43 | 0 | return new String(credentials); |
44 | |
} |
45 | |
|
46 | |
public Object getPrincipal() |
47 | |
{ |
48 | 0 | return user; |
49 | |
} |
50 | |
|
51 | |
public Map getProperties() |
52 | |
{ |
53 | 0 | return properties; |
54 | |
} |
55 | |
|
56 | |
public void setProperties(Map properties) |
57 | |
{ |
58 | 0 | this.properties = properties; |
59 | 0 | } |
60 | |
|
61 | |
} |