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