1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
package issrg.pba.rbac.x509; |
11 |
|
|
12 |
|
import issrg.pba.ParsedToken; |
13 |
|
import issrg.pba.rbac.SignatureVerifier; |
14 |
|
|
15 |
|
import org.apache.commons.codec.binary.Base64; |
16 |
|
import org.apache.log4j.*; |
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
@author |
21 |
|
|
|
|
| 0% |
Uncovered Elements: 19 (19) |
Complexity: 2 |
Complexity Density: 0.38 |
|
22 |
|
public class RoleBasedACBase64Parser extends RoleBasedACParser { |
23 |
|
|
24 |
|
Logger logger = Logger.getLogger(RoleBasedACBase64Parser.class.getName()); |
25 |
|
|
26 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
27 |
0
|
public RoleBasedACBase64Parser() {... |
28 |
0
|
super(); |
29 |
|
} |
30 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
31 |
0
|
public RoleBasedACBase64Parser(issrg.pba.rbac.RoleHierarchyPolicy rhpn, SignatureVerifier signatureVerifier ) {... |
32 |
0
|
super(rhpn,signatureVerifier); |
33 |
|
} |
34 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
35 |
0
|
public RoleBasedACBase64Parser(java.util.Map m, SignatureVerifier signatureVerifier){... |
36 |
0
|
super(m,signatureVerifier); |
37 |
|
} |
38 |
|
|
|
|
| 0% |
Uncovered Elements: 12 (12) |
Complexity: 2 |
Complexity Density: 0.2 |
|
39 |
0
|
public ParsedToken decode(Object acB) throws issrg.pba.PbaException {... |
40 |
0
|
logger.debug("to decode a text AC (base64)"); |
41 |
0
|
if (!String.class.isAssignableFrom(acB.getClass())) throw new issrg.pba.PbaException("unknown pushed credential type"); |
42 |
0
|
String binary = (String)acB; |
43 |
0
|
logger.debug(binary); |
44 |
0
|
byte [] b=new byte[binary.length()]; |
45 |
0
|
b = binary.getBytes(); |
46 |
0
|
Base64 base64 = new Base64(); |
47 |
0
|
byte [] ac = base64.decode(b); |
48 |
0
|
return this.decodeX509AC(ac); |
49 |
|
} |
50 |
|
} |