1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
package issrg.pba; |
33 |
|
|
34 |
|
import java.util.Vector; |
35 |
|
|
36 |
|
import issrg.pba.rbac.Revocable; |
37 |
|
import issrg.pba.rbac.policies.Subtree; |
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
|
|
| 81.2% |
Uncovered Elements: 3 (16) |
Complexity: 1 |
Complexity Density: 0.78 |
|
47 |
|
public class DefaultDelegatableToken extends DefaultParsedToken implements DelegatableToken{ |
48 |
|
Subtree subjectDomain; |
49 |
|
Credentials delegateableCredentials; |
50 |
|
int depth; |
51 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
52 |
0
|
protected DefaultDelegatableToken(){}... |
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
|
57 |
|
|
58 |
|
@param |
59 |
|
@param |
60 |
|
@param |
61 |
|
@param |
62 |
|
@param |
63 |
|
@param |
64 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
65 |
78
|
public DefaultDelegatableToken(issrg.utils.repository.Entry holder, issrg.utils.repository.TokenLocator issuer, ... |
66 |
|
Credentials creds, Credentials delegateableCredentials, Subtree subjectDomain, int depth){ |
67 |
78
|
this(holder,issuer,creds,delegateableCredentials,subjectDomain,depth,true); |
68 |
|
} |
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
69 |
948
|
public DefaultDelegatableToken(issrg.utils.repository.Entry holder, issrg.utils.repository.TokenLocator issuer, ... |
70 |
|
Credentials creds, Credentials delegateableCredentials, Subtree subjectDomain, int depth, boolean revocable){ |
71 |
948
|
super(holder, issuer, creds, revocable); |
72 |
948
|
this.delegateableCredentials = delegateableCredentials; |
73 |
948
|
this.subjectDomain = subjectDomain; |
74 |
948
|
this.depth = depth; |
75 |
|
} |
76 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
77 |
1071
|
public Credentials getDelegateableCredentials() {... |
78 |
1071
|
return delegateableCredentials; |
79 |
|
} |
80 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
81 |
894
|
public Subtree getSubjectDomain(){... |
82 |
894
|
return subjectDomain; |
83 |
|
} |
84 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
85 |
908
|
public int getDepth() {... |
86 |
908
|
return depth; |
87 |
|
} |
88 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
89 |
0
|
public String toString(){... |
90 |
0
|
return "Authorisation token issued by "+getIssuerTokenLocator().getEntry().getEntryName().getName()+" to "+getHolder().getEntryName().getName()+": "+getCredentials().toString() + "; the holder can delegate "+ getDelegateableCredentials() + " " + getDepth() + " levels down to subjects from domain "+subjectDomain; |
91 |
|
} |
92 |
|
} |