AuthenticationHandler.java
6.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa.protocol;
import com.adobe.xfa.ut.CharacterHolder;
import com.adobe.xfa.ut.IntegerHolder;
import com.adobe.xfa.ut.MsgFormatPos;
import com.adobe.xfa.ut.ObjectHolder;
import com.adobe.xfa.ut.StringHolder;
import java.net.Authenticator;
import java.net.PasswordAuthentication;
public abstract class AuthenticationHandler
extends Authenticator {
protected HandlerType meHandlerType = HandlerType.CLIENT;
private String msUserID = null;
private CharacterHolder maPassword = null;
private String msHint = null;
private AuthenticationType meTransportAuthType = AuthenticationType.NONE;
private String msURL = null;
private String msHost = null;
private String msType = null;
private String msRealm = null;
private ConnectStatus meTransportStatus = ConnectStatus.NOTSET;
private AuthenticationType meSOAPAuthType = AuthenticationType.NONE;
private String msSOAPAddress = null;
private String msSOAPOperation = null;
private String msConnectionName = null;
private SOAPRequestStatus meSOAPStatus = SOAPRequestStatus.SOAPNOTSET;
private String msSOAPFault = null;
private String msSOAPFaultCode = null;
public AuthenticationHandler(HandlerType eType) {
this.meHandlerType = eType;
}
public abstract boolean checkAuthenticationStatus();
public abstract boolean checkSOAPAuthenticationStatus();
public abstract AuthenticationHandler clone();
public abstract boolean getBasicCredentials(String var1, String var2, StringHolder var3, CharacterHolder var4);
public abstract boolean getBasicSOAPCredentials(String var1, String var2, String var3, StringHolder var4, CharacterHolder var5);
public abstract boolean getCertificateCredentials(String var1, CharacterHolder var2, IntegerHolder var3, ObjectHolder<byte[]> var4, StringHolder var5);
public abstract boolean isCertificateAuthorityValid(String var1);
public String getConnectionName() {
return this.msConnectionName;
}
public ConnectStatus getConnectStatus() {
return this.meTransportStatus;
}
public HandlerType getHandlerType() {
return this.meHandlerType;
}
public String getHint() {
return this.msHint;
}
public String getHost() {
return this.msHost;
}
public CharacterHolder getPassword() {
return this.maPassword;
}
public String getRealm() {
return this.msRealm;
}
public String getSOAPAddress() {
return this.msSOAPAddress;
}
public AuthenticationType getSOAPAuthType() {
return this.meSOAPAuthType;
}
public String getSOAPFaultCode() {
return this.msSOAPFaultCode;
}
public String getSOAPFaultString() {
return this.msSOAPFault;
}
public String getSOAPOperation() {
return this.msSOAPOperation;
}
public SOAPRequestStatus getSOAPRequestStatus() {
return this.meSOAPStatus;
}
public String getURL() {
return this.msURL;
}
public AuthenticationType getTransportAuthType() {
return this.meTransportAuthType;
}
public String getType() {
return this.msType;
}
public String getUserID() {
return this.msUserID;
}
public void logMessage(MsgFormatPos oError) {
}
public void reset() {
this.msUserID = "";
this.maPassword = new CharacterHolder();
this.msHint = "";
this.meTransportAuthType = AuthenticationType.NONE;
this.msURL = "";
this.msHost = "";
this.msType = "";
this.msRealm = "";
this.meTransportStatus = ConnectStatus.NOTSET;
this.meSOAPAuthType = AuthenticationType.NONE;
this.msSOAPAddress = "";
this.msSOAPOperation = "";
this.msConnectionName = "";
this.meSOAPStatus = SOAPRequestStatus.SOAPNOTSET;
this.msSOAPFault = "";
this.msSOAPFaultCode = "";
}
public void setConnectionName(String sConnectionName) {
this.msConnectionName = sConnectionName;
}
public void setConnectStatus(ConnectStatus eStatus) {
this.meTransportStatus = eStatus;
}
public void setHandlerType(HandlerType eHandlerType) {
this.meHandlerType = eHandlerType;
}
public void setHint(String sHint) {
this.msHint = sHint;
}
public void setHost(String sHost) {
this.msHost = sHost;
}
public void setPassword(CharacterHolder aPassword) {
this.maPassword = aPassword;
}
public void setRealm(String sRealm) {
this.msRealm = sRealm;
}
public void setSOAPAddress(String sSOAPAddress) {
this.msSOAPAddress = sSOAPAddress;
}
public void setSOAPAuthType(AuthenticationType eAuthType) {
this.meSOAPAuthType = eAuthType;
}
public void setSOAPFaultCode(String sSOAPFaultCode) {
this.msSOAPFaultCode = sSOAPFaultCode;
}
public void setSOAPFaultString(String sSOAPFault) {
this.msSOAPFault = sSOAPFault;
}
public void setSOAPOperation(String sSOAPOperation) {
this.msSOAPOperation = sSOAPOperation;
}
public void setSOAPRequestStatus(SOAPRequestStatus eSOAPStatus) {
this.meSOAPStatus = eSOAPStatus;
}
public void setTransportAuthType(AuthenticationType eAuthType) {
this.meTransportAuthType = eAuthType;
}
public void setType(String sType) {
this.msType = sType;
}
public void setURL(String sURL) {
this.msURL = sURL;
}
public void setUserID(String sUserID) {
this.msUserID = sUserID;
}
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return null;
}
public static enum SOAPRequestStatus {
SOAPNOTSET,
SOAPSUCCESS,
SOAPFAULT;
private SOAPRequestStatus() {
}
}
public static enum HandlerType {
CLIENT,
SERVER;
private HandlerType() {
}
}
public static enum ConnectStatus {
NOTSET(0),
CONNECTED(200),
CONNECTIONERROR(300),
UNAUTHORIZED(401),
FORBIDDEN(403),
FILENOTFOUND(404),
CLIENTAUTHCERTNEEDED(12044),
INVALIDCA(12045);
private int code;
private ConnectStatus(int c) {
this.code = c;
}
}
public static enum AuthenticationType {
NONE,
BASIC,
DIGEST,
CERTIFICATE;
private AuthenticationType() {
}
}
}