Clover Coverage Report
Coverage timestamp: Sun Mar 23 2008 08:24:39 GMT
13   50   2   3.25
2   28   0.38   4
4     1.25  
1    
 
 
  RoleBasedACBase64Parser       Line # 22 13 2 0% 0.0
 
No Tests
 
1    /*
2    * RoleBasedACBase64Parser.java
3    *
4    * Created on 19 December 2007, 23:28
5    *
6    * To change this template, choose Tools | Template Manager
7    * and open the template in the editor.
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 me
21    */
 
22    public class RoleBasedACBase64Parser extends RoleBasedACParser {
23   
24    Logger logger = Logger.getLogger(RoleBasedACBase64Parser.class.getName());
25   
26    /** Creates a new instance of RoleBasedACBase64Parser */
 
27  0 toggle public RoleBasedACBase64Parser() {
28  0 super();
29    }
30   
 
31  0 toggle public RoleBasedACBase64Parser(issrg.pba.rbac.RoleHierarchyPolicy rhpn, SignatureVerifier signatureVerifier ) {
32  0 super(rhpn,signatureVerifier);
33    }
34   
 
35  0 toggle public RoleBasedACBase64Parser(java.util.Map m, SignatureVerifier signatureVerifier){
36  0 super(m,signatureVerifier);
37    }
38   
 
39  0 toggle 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    }