1
2
3
4
5
6
7
8
9
10
11
12
13
14 package org.eclipse.jetty.plus.jaas.spi;
15
16 import java.util.ArrayList;
17 import java.util.List;
18
19 import org.eclipse.jetty.http.security.Credential;
20
21
22
23
24
25
26
27
28
29 public class UserInfo
30 {
31
32 private String userName;
33 private Credential credential;
34 private List roleNames;
35
36
37 public UserInfo (String userName, Credential credential, List roleNames)
38 {
39 this.userName = userName;
40 this.credential = credential;
41 this.roleNames = new ArrayList();
42 if (roleNames != null)
43 this.roleNames.addAll(roleNames);
44 }
45
46 public String getUserName()
47 {
48 return this.userName;
49 }
50
51 public List getRoleNames ()
52 {
53 return new ArrayList(this.roleNames);
54 }
55
56 public boolean checkCredential (Object suppliedCredential)
57 {
58 return this.credential.check(suppliedCredential);
59 }
60
61 protected Credential getCredential ()
62 {
63 return this.credential;
64 }
65
66 }