KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mule > impl > security > MuleAuthentication


1 /*
2  * $Id: MuleAuthentication.java 3798 2006-11-04 04:07:14Z aperepel $
3  * --------------------------------------------------------------------------------------
4  * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
5  *
6  * The software in this package is published under the terms of the MuleSource MPL
7  * license, a copy of which has been included with this distribution in the
8  * LICENSE.txt file.
9  */

10
11 package org.mule.impl.security;
12
13 import java.util.Map JavaDoc;
14
15 import org.mule.umo.security.UMOAuthentication;
16 import org.mule.umo.security.UMOCredentials;
17
18 /**
19  * <code>MuleAuthentication</code> TODO
20  *
21  * @author <a HREF="mailto:ross.mason@symphonysoft.com">Ross Mason</a>
22  * @version $Revision: 3798 $
23  */

24 public class MuleAuthentication implements UMOAuthentication
25 {
26     private boolean authenticated;
27     private char[] credentials;
28     private String JavaDoc user;
29     private Map JavaDoc properties;
30
31     public MuleAuthentication(UMOCredentials credentials)
32     {
33         this.user = credentials.getUsername();
34         this.credentials = credentials.getPassword();
35     }
36
37     public void setAuthenticated(boolean b)
38     {
39         authenticated = b;
40     }
41
42     public boolean isAuthenticated()
43     {
44         return authenticated;
45     }
46
47     public Object JavaDoc getCredentials()
48     {
49         return new String JavaDoc(credentials);
50     }
51
52     public Object JavaDoc getPrincipal()
53     {
54         return user;
55     }
56
57     public Map JavaDoc getProperties()
58     {
59         return properties;
60     }
61
62     public void setProperties(Map JavaDoc properties)
63     {
64         this.properties = properties;
65     }
66
67 }
68
Popular Tags