Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
MuleJaasPrincipal |
|
| 1.5;1.5 |
1 | /* | |
2 | * $Id: MuleJaasPrincipal.java 19191 2010-08-25 21:05:23Z tcarlson $ | |
3 | * -------------------------------------------------------------------------------------- | |
4 | * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.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.module.jaas; | |
12 | ||
13 | import java.security.Principal; | |
14 | ||
15 | public class MuleJaasPrincipal implements Principal | |
16 | { | |
17 | private final String name; | |
18 | ||
19 | public MuleJaasPrincipal(String name) | |
20 | 0 | { |
21 | 0 | if (name == null) |
22 | { | |
23 | 0 | throw new IllegalArgumentException("Null name"); |
24 | } | |
25 | 0 | this.name = name; |
26 | 0 | } |
27 | ||
28 | public String getName() | |
29 | { | |
30 | 0 | return name; |
31 | } | |
32 | ||
33 | public String toString() | |
34 | { | |
35 | 0 | return name; |
36 | } | |
37 | ||
38 | public int hasCode() | |
39 | { | |
40 | 0 | return name.hashCode(); |
41 | } | |
42 | } |