Coverage Report - ca.uhn.hl7v2.hoh.auth.SingleCredentialClientCallback
 
Classes in this File Line Coverage Branch Coverage Complexity
SingleCredentialClientCallback
100%
12/12
N/A
1
 
 1  
 package ca.uhn.hl7v2.hoh.auth;
 2  
 
 3  
 import ca.uhn.hl7v2.hoh.api.IAuthorizationClientCallback;
 4  
 
 5  
 /**
 6  
  * Authorization Callback which validates a single username and password
 7  
  */
 8  
 public class SingleCredentialClientCallback implements IAuthorizationClientCallback {
 9  
 
 10  
         private String myPassword;
 11  
         private String myUsername;
 12  
 
 13  10
         public SingleCredentialClientCallback() {
 14  10
         }
 15  
 
 16  130
         public SingleCredentialClientCallback(String theUsername, String thePassword) {
 17  130
                 myUsername = theUsername;
 18  130
                 myPassword = thePassword;
 19  130
         }
 20  
 
 21  
         public String providePassword(String theUriPath) {
 22  130
                 return myPassword;
 23  
         }
 24  
 
 25  
         public String provideUsername(String theUriPath) {
 26  130
                 return myUsername;
 27  
         }
 28  
 
 29  
         /**
 30  
          * @param thePassword
 31  
          *            the password to set
 32  
          */
 33  
         public void setPassword(String thePassword) {
 34  10
                 myPassword = thePassword;
 35  10
         }
 36  
 
 37  
         /**
 38  
          * @param theUsername
 39  
          *            the username to set
 40  
          */
 41  
         public void setUsername(String theUsername) {
 42  10
                 myUsername = theUsername;
 43  10
         }
 44  
 
 45  
 }