Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
PGPAuthentication |
|
| 1.0;1 |
1 | /* | |
2 | * $Id: PGPAuthentication.java 7976 2007-08-21 14:26:13Z dirk.olmes $ | |
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 CPAL v1.0 | |
7 | * license, a copy of which has been included with this distribution in the | |
8 | * LICENSE.txt file. | |
9 | */ | |
10 | ||
11 | package org.mule.extras.pgp; | |
12 | ||
13 | import org.mule.umo.security.UMOAuthentication; | |
14 | ||
15 | import java.util.Map; | |
16 | ||
17 | import cryptix.message.Message; | |
18 | import cryptix.pki.KeyBundle; | |
19 | ||
20 | public class PGPAuthentication implements UMOAuthentication | |
21 | { | |
22 | 0 | boolean authenticated = false; |
23 | private String userName; | |
24 | private Message message; | |
25 | 0 | private KeyBundle userKeyBundle = null; |
26 | ||
27 | public PGPAuthentication(String userName, Message message) | |
28 | 0 | { |
29 | 0 | this.userName = userName; |
30 | 0 | this.message = message; |
31 | 0 | } |
32 | ||
33 | /* | |
34 | * (non-Javadoc) | |
35 | * | |
36 | * @see org.mule.umo.security.UMOAuthentication#setAuthenticated(boolean) | |
37 | */ | |
38 | public void setAuthenticated(boolean b) | |
39 | { | |
40 | 0 | authenticated = b; |
41 | 0 | } |
42 | ||
43 | /* | |
44 | * (non-Javadoc) | |
45 | * | |
46 | * @see org.mule.umo.security.UMOAuthentication#isAuthenticated() | |
47 | */ | |
48 | public boolean isAuthenticated() | |
49 | { | |
50 | 0 | return authenticated; |
51 | } | |
52 | ||
53 | /* | |
54 | * (non-Javadoc) | |
55 | * | |
56 | * @see org.mule.umo.security.UMOAuthentication#getCredentials() | |
57 | */ | |
58 | public Object getCredentials() | |
59 | { | |
60 | 0 | return message; |
61 | } | |
62 | ||
63 | /* | |
64 | * (non-Javadoc) | |
65 | * | |
66 | * @see org.mule.umo.security.UMOAuthentication#getDetails() | |
67 | */ | |
68 | public Object getDetails() | |
69 | { | |
70 | 0 | return userKeyBundle; |
71 | } | |
72 | ||
73 | protected void setDetails(KeyBundle kb) | |
74 | { | |
75 | 0 | userKeyBundle = kb; |
76 | 0 | } |
77 | ||
78 | /* | |
79 | * (non-Javadoc) | |
80 | * | |
81 | * @see org.mule.umo.security.UMOAuthentication#getPrincipal() | |
82 | */ | |
83 | public Object getPrincipal() | |
84 | { | |
85 | 0 | return userName; |
86 | } | |
87 | ||
88 | public Map getProperties() | |
89 | { | |
90 | // TODO | |
91 | 0 | return null; |
92 | } | |
93 | ||
94 | public void setProperties(Map securityMode) | |
95 | { | |
96 | // TODO | |
97 | ||
98 | 0 | } |
99 | ||
100 | } |