1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.springbyexample.httpclient.auth;
18
19 import java.io.Serializable;
20
21
22
23
24
25
26
27
28
29
30 public class NTCredentials extends Credentials implements Serializable {
31
32 private static final long serialVersionUID = -6920896316432574273L;
33
34 protected String host = null;
35 protected String domain = null;
36
37
38
39
40 public NTCredentials() {}
41
42
43
44
45 public NTCredentials(String authScopeHost, int authScopePort,
46 String userName, String password,
47 String host, String domain) {
48 super(authScopeHost, authScopePort, userName, password);
49
50 this.host = host;
51 this.domain = domain;
52 }
53
54
55
56
57 public String getHost() {
58 return host;
59 }
60
61
62
63
64 public void setHost(String host) {
65 this.host = host;
66 }
67
68
69
70
71 public String getDomain() {
72 return domain;
73 }
74
75
76
77
78 public void setDomain(String domain) {
79 this.domain = domain;
80 }
81
82
83
84
85 public String toString() {
86 StringBuilder sb = new StringBuilder();
87
88 sb.append(this.getClass().getName());
89 sb.append(" { ");
90 sb.append("authScopeHost=" + authScopeHost);
91 sb.append(" authScopePort=" + authScopePort);
92 sb.append(" userName=" + userName);
93 sb.append(" password=" + password);
94 sb.append(" host=" + host);
95 sb.append(" domain=" + domain);
96 sb.append(" }");
97
98 return sb.toString();
99 }
100
101 }