View Javadoc
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  	public SingleCredentialClientCallback() {
14  	}
15  
16  	public SingleCredentialClientCallback(String theUsername, String thePassword) {
17  		myUsername = theUsername;
18  		myPassword = thePassword;
19  	}
20  
21  	public String providePassword(String theUriPath) {
22  		return myPassword;
23  	}
24  
25  	public String provideUsername(String theUriPath) {
26  		return myUsername;
27  	}
28  
29  	/**
30  	 * @param thePassword
31  	 *            the password to set
32  	 */
33  	public void setPassword(String thePassword) {
34  		myPassword = thePassword;
35  	}
36  
37  	/**
38  	 * @param theUsername
39  	 *            the username to set
40  	 */
41  	public void setUsername(String theUsername) {
42  		myUsername = theUsername;
43  	}
44  
45  }