m2u-upass-core / src / my / com / upass / Constants.java @ 8:1982e43e6686
History | View | Annotate | Download (20.6 KB)
1 |
/*
|
---|---|
2 |
* Copyright TFOS 2009
|
3 |
* date description ---
|
4 |
* 20090420 include tac_max_used feature
|
5 |
*/
|
6 |
package my.com.upass; |
7 |
|
8 |
import java.text.SimpleDateFormat; |
9 |
import java.util.HashMap; |
10 |
|
11 |
/**
|
12 |
* @author Administrator
|
13 |
*
|
14 |
*/
|
15 |
public class Constants { |
16 |
// object query mode
|
17 |
public static final int MODE_QUSERBEAN = 0; |
18 |
public static final int MODE_QTACBEAN = 1; |
19 |
public static final int MODE_QVASCOBEAN = 2; |
20 |
|
21 |
public static final int MODE_QNEXTVAL = 0; |
22 |
public static final int MODE_QCURRVAL = 1; |
23 |
|
24 |
// user ID state
|
25 |
public static final int UID_STATE_ACTIVE = 0; |
26 |
public static final int UID_STATE_TMP_LOCKED = 1; |
27 |
public static final int UID_STATE_LOCKED = 2; |
28 |
public static final int UID_STATE_INACTIVE = 3; |
29 |
public static final int UID_STATE_DELETED = 4; |
30 |
|
31 |
// token state
|
32 |
public static final int TKN_STATE_UNASSIGNED = 0; |
33 |
public static final int TKN_STATE_ASSIGNED = 1; |
34 |
public static final int TKN_STATE_DISABLE = 2; |
35 |
public static final int TKN_STATE_LOCKED = 3; |
36 |
public static final int TKN_STATE_DELETED = 4; |
37 |
|
38 |
// user Type
|
39 |
public static final int UTYPE_STATE_ROOT = 0; |
40 |
public static final int UTYPE_STATE_ADMIN = 1; |
41 |
public static final int UTYPE_STATE_USER = 2; |
42 |
|
43 |
// password status
|
44 |
public static final int PASSWD_STATUS_ENABLE = 0; |
45 |
public static final int PASSWD_STATUS_DISABLE = 1; |
46 |
public static final int PASSWD_STATUS_ONETIMEUSED = 2; |
47 |
public static final int PASSWD_LIFE_SPAN = 30; |
48 |
public static final int PASSWD_NEVER_EXPIRE = 1; |
49 |
public static final int PASSWD_WILL_EXPIRE = 0; |
50 |
|
51 |
// general status
|
52 |
public static final int YES = 0; |
53 |
public static final int NO = 1; |
54 |
public static final int NEVER = 9; |
55 |
|
56 |
// application Error Code
|
57 |
public static final int ERR_SUCCESS = 0; |
58 |
public static final int ERR_INVALID_CREDENTIAL = 1; |
59 |
public static final int ERR_EXCEED_MAX_TRIES = 2; |
60 |
public static final int ERR_REUSED_PASSWD = 3; |
61 |
public static final int ERR_PASSWD_EXPIRED = 4; |
62 |
public static final int ERR_INVALID_STATE = 5; |
63 |
public static final int ERR_USERALIAS_NOT_FOUND = 6; |
64 |
public static final int ERR_TOKEN_NOT_ASSIGNED = 7; |
65 |
public static final int ERR_TOKEN_ALREADY_ASSIGNED = 8; |
66 |
public static final int ERR_TOKEN_NOT_EXIST = 9; |
67 |
public static final int ERR_APP_SERV_NOT_PERMITTED = 10; |
68 |
public static final int ERR_ALREADY_EXIST = 11; |
69 |
public static final int ERR_TAC_ALREADY_EXIST = 12; |
70 |
public static final int ERR_EXCEED_MAX_USE = 13; |
71 |
public static final int ERR_INVALID_SESSION = 14; |
72 |
public static final int ERR_USER_DORMANT = 15; |
73 |
public static final int ERR_INVALID_USERALIAS = 16; |
74 |
public static final int ERR_PASSWORD_SAMEAS_USERALIAS = 17; |
75 |
|
76 |
public static final int ERR_PASSWD_EXPIRED_NOTIFICATION = 27; |
77 |
public static final int ERR_PASSWD_CHANGE_INTERVAL = 28; |
78 |
|
79 |
//Additional error code for gemalto application (from code 18 to code 26)
|
80 |
public static final int ERR_BLOBINVALID = 18; |
81 |
public static final int ERR_BUFFER = 19; |
82 |
public static final int ERR_PARAM = 20; |
83 |
public static final int ERR_SNOINVALID = 21; |
84 |
public static final int ERR_OTPINVALID = 22; |
85 |
public static final int ERR_BLOBOTINIT = 23; |
86 |
public static final int ERR_FAILED = 24; |
87 |
public static final int ERR_REQINVALID = 25; |
88 |
public static final int ERR_AUTH_MODE = 26; |
89 |
|
90 |
|
91 |
public static final int ERR_PASSWD_WEAK = 96; |
92 |
public static final int ERR_INVALID_INPUT = 97; |
93 |
public static final int ERR_SYSTEM_NOT_READY = 98; |
94 |
public static final int ERR_UNKNOWN = 99; |
95 |
public static final int ERR_SECURITY_CODE_ALREADY_EXIST = 32; |
96 |
|
97 |
//Additional error code for secure metric application (from code 102 to code 215)
|
98 |
public static final int OTPR_CORE_COMMON_FAIL = 101; |
99 |
public static final int OTPR_CORE_COMMON_INVALID_PARAMETER = 102; |
100 |
public static final int OTPR_CORE_COMMON_INVALID_LICENSE = 103; |
101 |
public static final int OTPR_CORE_COMMON_EXPIRED_LICENSE = 104; |
102 |
public static final int OTPR_CORE_AUTH_OK = 105; |
103 |
public static final int OTPR_CORE_UID_EMPTY = 106; |
104 |
public static final int OTPR_CORE_OTP_EMPTY = 107; |
105 |
public static final int OTPR_CORE_PIN_EMPTY = 108; |
106 |
public static final int OTPR_CORE_TSN_EMPTY = 109; |
107 |
public static final int OTPR_CORE_INVALID_UID = 110; |
108 |
public static final int OTPR_CORE_INVALID_OTP = 111; |
109 |
public static final int OTPR_CORE_INVALID_TOKENKEY = 112; |
110 |
public static final int OTPR_CORE_INVALID_AUTHNUM = 113; |
111 |
public static final int OTPR_CORE_NEED_SYNC = 114; |
112 |
public static final int OTPR_CORE_INVALID_TIMEDRIFT = 115; |
113 |
public static final int OTPR_CORE_INVALID_USERPIN = 116; |
114 |
public static final int OTPR_CORE_INVALID_DBUPIN = 117; |
115 |
public static final int OTPR_CORE_ERR_GETUSER = 118; |
116 |
public static final int OTPR_CORE_ERR_GETTOKEN = 119; |
117 |
public static final int OTPR_CORE_TOKEN_LOCKED = 110; |
118 |
public static final int OTPR_CORE_LOGIN_LOCKED = 111; |
119 |
public static final int OTPR_CORE_PIN_NOTINIT = 112; |
120 |
public static final int OTPR_CORE_INVALID_TOKENTYPE = 113; |
121 |
public static final int OTPR_CORE_INVALID_TOKENSN = 114; |
122 |
public static final int OTPR_CORE_ERR_GETASSIGNED = 115; |
123 |
public static final int OTPR_CORE_ERR_GETTOKENNUM = 116; |
124 |
public static final int OTPR_CORE_TOKEN_BINDED = 117; |
125 |
public static final int OTPR_CORE_BIND_EXCEED = 118; |
126 |
public static final int OTPR_CORE_NEED_VERIFYPIN = 119; |
127 |
public static final int OTPR_CORE_USER_INACTIVE = 120; |
128 |
public static final int OTPR_CORE_AGENT_EMPTY = 121; |
129 |
public static final int OTPR_CORE_HOST_EMPTY = 122; |
130 |
public static final int OTPR_CORE_SHARE_KEY_EMPTY = 123; |
131 |
public static final int OTPR_CORE_DB_INVALID_CONFIGFILE = 124; |
132 |
public static final int OTPR_CORE_DB_INVALID_DBTYPE = 125; |
133 |
public static final int OTPR_CORE_DB_ERROR_CONNECT = 126; |
134 |
public static final int OTPR_CORE_DB_DATASOURCE_NOTFOUND = 127; |
135 |
public static final int OTPR_CORE_DB_DATABASE_NOTFOUND = 128; |
136 |
public static final int OTPR_CORE_DB_SERVER_NOTFOUND = 129; |
137 |
public static final int OTPR_CORE_DB_INVALID_AUTH = 130; |
138 |
public static final int OTPR_CORE_DB_NOTBEUSED_CONNECT = 131; |
139 |
public static final int OTPR_CORE_DB_TOOMANY_CONNECT = 132; |
140 |
public static final int OTPR_CORE_DB_USERSOURCE_ESTOP = 133; |
141 |
public static final int OTPR_CORE_DB_USER_EXISTS = 134; |
142 |
public static final int OTPR_CORE_DB_USER_NOTEXISTS = 135; |
143 |
public static final int OTPR_CORE_DB_RECORD_NOTEXISTS = 136; |
144 |
public static final int OTPR_CORE_DB_TOKEN_EXISTS = 137; |
145 |
public static final int OTPR_CORE_DB_TOKEN_NOTEXISTS = 138; |
146 |
public static final int OTPR_CORE_DB_AGENT_EXISTS = 139; |
147 |
public static final int OTPR_CORE_DB_AGENT_NOTEXISTS = 140; |
148 |
public static final int OTPR_CORE_DB_HOST_EXISTS = 141; |
149 |
public static final int OTPR_CORE_DB_HOST_NOTEXISTS = 142; |
150 |
public static final int OTPR_CORE_DB_INVALID_USERSOURCETYPE = 143; |
151 |
public static final int OTPR_CORE_DB_NOTENOUGH_BUFFER = 144; |
152 |
public static final int OTPR_CORE_DB_ERROR_QUERY = 145; |
153 |
public static final int OTPR_CORE_DB_ADD_USER_FAILED = 146; |
154 |
public static final int OTPR_CORE_DB_DEL_USER_FAILED = 147; |
155 |
public static final int OTPR_CORE_DB_QUERY_USER_FAILED = 148; |
156 |
public static final int OTPR_CORE_DB_UPDATE_USER_FAILED = 149; |
157 |
public static final int OTPR_CORE_DB_ADD_TOKEN_FAILED = 150; |
158 |
public static final int OTPR_CORE_DB_DEL_TOKEN_FAILED = 151; |
159 |
public static final int OTPR_CORE_DB_QUERY_TOKEN_FAILED = 152; |
160 |
public static final int OTPR_CORE_DB_UPDATE_TOKEN_FAILED = 153; |
161 |
public static final int OTPR_CORE_DB_BIND_USER_TOKEN_FAILED = 154; |
162 |
public static final int OTPR_CORE_DB_UNBIND_USER_TOKEN_FAILED = 155; |
163 |
public static final int OTPR_CORE_DB_USER_TOKEN_UNBIND = 156; |
164 |
public static final int OTPR_CORE_DB_ADD_AGENT_FAILED = 157; |
165 |
public static final int OTPR_CORE_DB_DEL_AGENT_FAILED = 158; |
166 |
public static final int OTPR_CORE_DB_CHANGE_AGENT_FAILED = 159; |
167 |
public static final int OTPR_CORE_DB_QUERY_AGENT_FAILED = 160; |
168 |
public static final int OTPR_CORE_DB_ADD_HOST_FAILED = 161; |
169 |
public static final int OTPR_CORE_DB_DEL_HOST_FAILED = 162; |
170 |
public static final int OTPR_CORE_DB_CHANGE_HOST_FAILED = 163; |
171 |
public static final int OTPR_CORE_DB_QUERY_HOST_FAILED = 164; |
172 |
public static final int OTPR_CORE_DB_ADD_AGENT_HOST_FAILED = 165; |
173 |
public static final int OTPR_CORE_DB_DEL_AGENT_HOST_FAILED = 166; |
174 |
public static final int OTPR_CORE_DB_CHANGE_AGENT_HOST_FAILED = 167; |
175 |
public static final int OTPR_CORE_DB_QUERY_AGENT_HOST_FAILED = 168; |
176 |
public static final int OTPR_CORE_DB_ADD_LOG_FAILED = 169; |
177 |
public static final int OTPR_CORE_DB_DEL_LOG_FAILED = 170; |
178 |
public static final int OTPR_CORE_DB_CHANGE_LOG_FAILED = 171; |
179 |
public static final int OTPR_CORE_DB_QUERY_LOG_FAILED = 172; |
180 |
public static final int OTPR_CORE_DB_ADD_CONFIG_FAILED = 173; |
181 |
public static final int OTPR_CORE_DB_DEL_CONFIG_FAILED = 174; |
182 |
public static final int OTPR_CORE_DB_CHANGE_CONFIG_FAILED = 175; |
183 |
public static final int OTPR_CORE_DB_QUERY_CONFIG_FAILED = 176; |
184 |
public static final int OTPR_CORE_DB_ADD_ADMIN_GROUP_FAILED = 177; |
185 |
public static final int OTPR_CORE_DB_DEL_ADMIN_GROUP_FAILED = 178; |
186 |
public static final int OTPR_CORE_DB_CHANGE_ADMIN_GROUP_FAILED = 179; |
187 |
public static final int OTPR_CORE_DB_QUERY_ADMIN_GROUP_FAILED = 180; |
188 |
public static final int OTPR_CORE_DB_ADD_ADMIN_LOG_FAILED = 181; |
189 |
public static final int OTPR_CORE_DB_DEL_ADMIN_LOG_FAILED = 182; |
190 |
public static final int OTPR_CORE_DB_CHANGE_ADMIN_LOG_FAILED = 183; |
191 |
public static final int OTPR_CORE_DB_QUERY_ADMIN_LOG_FAILED = 184; |
192 |
public static final int OTPR_CORE_DB_ADD_ADMIN_USER_FAILED = 185; |
193 |
public static final int OTPR_CORE_DB_DEL_ADMIN_USER_FAILED = 186; |
194 |
public static final int OTPR_CORE_DB_CHANGE_ADMIN_USER_FAILED = 187; |
195 |
public static final int OTPR_CORE_DB_QUERY_ADMIN_USER_FAILED = 188; |
196 |
public static final int OTPR_CORE_DB_ADD_DOMAIN_FAILED = 189; |
197 |
public static final int OTPR_CORE_DB_DEL_DOMAIN_FAILED = 190; |
198 |
public static final int OTPR_CORE_DB_CHANGE_DOMAIN_FAILED = 191; |
199 |
public static final int OTPR_CORE_DB_QUERY_DOMAIN_FAILED = 192; |
200 |
public static final int OTPR_CORE_DB_ADD_TEMP_USER_FAILED = 193; |
201 |
public static final int OTPR_CORE_DB_DEL_TEMP_USER_FAILED = 194; |
202 |
public static final int OTPR_CORE_DB_CHANGE_TEMP_USER_FAILED = 195; |
203 |
public static final int OTPR_CORE_DB_QUERY_TEMP_USER_FAILED = 196; |
204 |
public static final int OTPR_CORE_DB_RELOAD_CONNECTION_FAILED = 197; |
205 |
public static final int OTPR_CORE_COMM_EXPIRED_LOG4J = 198; |
206 |
public static final int OTPR_CORE_DB_ADD_APPGROUP_FAILED = 199; |
207 |
public static final int OTPR_CORE_DB_DEL_APPGROUP_FAILED = 200; |
208 |
public static final int OTPR_CORE_DB_CHANGE_APPGROUP_FAILED = 201; |
209 |
public static final int OTPR_CORE_DB_QUERY_APPGROUP_FAILED = 202; |
210 |
public static final int OTPR_CORE_DB_ADD_USER_GROUP_FAILED = 203; |
211 |
public static final int OTPR_CORE_DB_DEL_USER_GROUP_FAILED = 204; |
212 |
public static final int OTPR_CORE_DB_CHANGE_USER_GROUP_FAILED = 205; |
213 |
public static final int OTPR_CORE_DB_QUERY_USER_GROUP_FAILED = 206; |
214 |
public static final int OTPR_CORE_DB_ADD_ZONE_FAILED = 207; |
215 |
public static final int OTPR_CORE_DB_DEL_ZONE_FAILED = 208; |
216 |
public static final int OTPR_CORE_DB_CHANGE_ZONE_FAILED = 209; |
217 |
public static final int OTPR_CORE_DB_QUERY_ZONE_FAILED = 210; |
218 |
public static final int OTPR_CORE_DB_ADD_LICENSE_FAILED = 211; |
219 |
public static final int OTPR_CORE_DB_DEL_LICENSE_FAILED = 212; |
220 |
public static final int OTPR_CORE_DB_CHANGE_LICENSE_FAILED = 213; |
221 |
public static final int OTPR_CORE_DB_QUERY_LICENSE_FAILED = 214; |
222 |
public static final int OTPR_CORE_DB_LDAP_INIT_FAILED = 215; |
223 |
|
224 |
//Gemalto application's required parameters;
|
225 |
public static final String OCRASUITE = "OCRA-1:HOTP-SHA1-8:QH64-T30S"; |
226 |
public static final int TIMESTEPUSED = 30; //default is 30 due to S'pore regulation |
227 |
|
228 |
// application Error Text
|
229 |
public static HashMap<String,String> getErrText(String code) { |
230 |
HashMap<String,String> map = new HashMap<String,String>(); |
231 |
|
232 |
// begin text
|
233 |
map.put("0", "ERR_SUCCESS" ); |
234 |
map.put("1", "ERR_INVALID_CREDENTIAL" ); |
235 |
map.put("2", "ERR_EXCEED_MAX_TRIES" ); |
236 |
map.put("3", "ERR_REUSED_PASSWD" ); |
237 |
map.put("4", "ERR_PASSWD_EXPIRED" ); |
238 |
map.put("5", "ERR_INVALID_STATE" ); |
239 |
map.put("6", "ERR_USERALIAS_NOT_FOUND" ); |
240 |
map.put("7", "ERR_TOKEN_NOT_ASSIGNED" ); |
241 |
map.put("8", "ERR_TOKEN_ALREADY_ASSIGNED" ); |
242 |
map.put("9", "ERR_TOKEN_NOT_EXIST" ); |
243 |
map.put("10", "ERR_APP_SERV_NOT_PERMITTED" ); |
244 |
map.put("11", "ERR_ALREADY_EXIST" ); |
245 |
map.put("12", "ERR_TAC_ALREADY_EXIST" ); |
246 |
map.put("13", "ERR_EXCEED_MAX_USE" ); |
247 |
map.put("14", "ERR_INVALID_SESSION" ); |
248 |
map.put("15", "ERR_EXCEED_MAX_USE" ); |
249 |
map.put("16", "ERR_USER_DORMANT" ); |
250 |
map.put("17", "ERR_PASSWORD_SAMEAS_USERALIAS" ); |
251 |
|
252 |
//Additional error text for gemalto application (from text 18 to text 26)
|
253 |
map.put("18", "ERR_BLOBINVALID" ); |
254 |
map.put("19", "ERR_BUFFER" ); |
255 |
map.put("20", "ERR_PARAM" ); |
256 |
map.put("21", "ERR_SNOINVALID" ); |
257 |
map.put("22", "ERR_OTPINVALID" ); |
258 |
map.put("23", "ERR_BLOBOTINIT" ); |
259 |
map.put("24", "ERR_FAILED" ); |
260 |
map.put("25", "ERR_REQINVALID" ); |
261 |
map.put("26", "ERR_AUTH_MODE" ); |
262 |
|
263 |
map.put("96", "ERR_PASSWD_WEAK" ); |
264 |
map.put("97", "ERR_INVALID_INPUT" ); |
265 |
map.put("98", "ERR_SYSTEM_NOT_READY" ); |
266 |
map.put("99", "ERR_UNKNOWN" ); |
267 |
|
268 |
//Additional error code for secure metric application (from code 102 to code 225)
|
269 |
map.put("101", "Execution failure" ); |
270 |
map.put("102", "Invalid parameter" ); |
271 |
map.put("103", "Incorrect license file" ); |
272 |
map.put("104", "License file expired" ); |
273 |
map.put("105", "Successful authentication" ); |
274 |
map.put("106", "No username found" ); |
275 |
map.put("107", "No dynamic password found" ); |
276 |
map.put("108", "No user PIN found" ); |
277 |
map.put("109", "No token number found" ); |
278 |
map.put("110", "Invalid username" ); |
279 |
map.put("111", "Invalid OTP" ); |
280 |
map.put("112", "Invalid token seed" ); |
281 |
map.put("113", "Invalid authentication base number" ); |
282 |
map.put("114", "The token should be synchronized" ); |
283 |
map.put("115", "Invalid clock offset" ); |
284 |
map.put("116", "Invalid user PIN" ); |
285 |
map.put("117", "Invalid database user PIN" ); |
286 |
map.put("118", "Failed to get userinformation" ); |
287 |
map.put("119", "Failed to get token information" ); |
288 |
map.put("120", "The token has been reported as lost" ); |
289 |
map.put("121", "The token has beenlocked" ); |
290 |
map.put("122", "No PIN in database" ); |
291 |
map.put("123", "Invalid token type" ); |
292 |
map.put("124", "Invalid token number" ); |
293 |
map.put("125", "Failed to get token assignment status" ); |
294 |
map.put("126", "Failed to get the number of the tokens assigned to the user" ); |
295 |
map.put("127", "The token has been assigned" ); |
296 |
map.put("128", "The number of the tokens that are bound is the maximum already" ); |
297 |
map.put("129", "Need to verify PIN" ); |
298 |
map.put("130", "The user is inactive" ); |
299 |
map.put("131", "No authentication agent found" ); |
300 |
map.put("132", "No authentication server found" ); |
301 |
map.put("133", "No shared key found" ); |
302 |
map.put("134", "Configuration file error" ); |
303 |
map.put("135", "Database type error" ); |
304 |
map.put("136", "Connection error" ); |
305 |
map.put("137", "No data source found or driver error" ); |
306 |
map.put("138", "No database found" ); |
307 |
map.put("139", "No server found or access denied" ); |
308 |
map.put("140", "Username/password error, logon failure" ); |
309 |
map.put("141", "No connection available" ); |
310 |
map.put("142", "The number of connections is the maximum already" ); |
311 |
map.put("143", "The operation is restricted by user source settings" ); |
312 |
map.put("144", "The user already exists" ); |
313 |
map.put("145", "The user does not exist" ); |
314 |
map.put("146", "The record does not exist" ); |
315 |
map.put("147", "The token already exists" ); |
316 |
map.put("148", "The token does not exist" ); |
317 |
map.put("149", "The agent already exists" ); |
318 |
map.put("150", "The agent does not exist" ); |
319 |
map.put("151", "The authentication server already exists" ); |
320 |
map.put("152", "The authentication server does not exist" ); |
321 |
map.put("153", "User source type error" ); |
322 |
map.put("154", "The buffer is not long enough" ); |
323 |
map.put("155", "Failed to execute a query" ); |
324 |
map.put("156", "Failed to add user information" ); |
325 |
map.put("157", "Failed to delete user information" ); |
326 |
map.put("158", "Failed to search for user information" ); |
327 |
map.put("159", "Failed to change user information" ); |
328 |
map.put("160", "Failed to add token information" ); |
329 |
map.put("161", "Failed to delete token information" ); |
330 |
map.put("162", "Failed to search for token information" ); |
331 |
map.put("163", "Failed to change token information" ); |
332 |
map.put("164", "Failed to bind token" ); |
333 |
map.put("165", "Failed to unbind token" ); |
334 |
map.put("166", "The token has not been bound" ); |
335 |
map.put("167", "Failed to add authentication agent" ); |
336 |
map.put("168", "Failed to delete authentication agent" ); |
337 |
map.put("169", "Failed to update authentication agent" ); |
338 |
map.put("170", "Failed to get authentication agent" ); |
339 |
map.put("171", "Failed to add authentication server" ); |
340 |
map.put("172", "Failed to delete authentication server" ); |
341 |
map.put("173", "Failed to update authentication server" ); |
342 |
map.put("174", "Failed to get authentication server" ); |
343 |
map.put("175", "Failed to add mapping to authentication agent" ); |
344 |
map.put("176", "Failed to delete mapping to authentication agent" ); |
345 |
map.put("177", "Failed to update mapping to authentication agent" ); |
346 |
map.put("178", "Failed to get mapping to authentication agent" ); |
347 |
map.put("179", "Failed to add log" ); |
348 |
map.put("180", "Failed to delete log" ); |
349 |
map.put("181", "Failed to update log" ); |
350 |
map.put("182", "Failed to get log" ); |
351 |
map.put("183", "Failed to add configuration" ); |
352 |
map.put("184", "Failed to delete configuration" ); |
353 |
map.put("185", "Failed to update configuration" ); |
354 |
map.put("186", "Failed to get configuration" ); |
355 |
map.put("187", "Failed to add administrator group" ); |
356 |
map.put("188", "Failed to delete administrator group" ); |
357 |
map.put("189", "Failed to update administrator group" ); |
358 |
map.put("190", "Failed to get administrator group" ); |
359 |
map.put("191", "Failed to add administration log" ); |
360 |
map.put("192", "Failed to delete administration log" ); |
361 |
map.put("193", "Failed to update administration log" ); |
362 |
map.put("194", "Failed to get administration log" ); |
363 |
map.put("195", "Failed to add administrator" ); |
364 |
map.put("196", "Failed to delete administrator" ); |
365 |
map.put("197", "Failed to update administrator" ); |
366 |
map.put("198", "Failed to get administrator" ); |
367 |
map.put("199", "Failed to add domain" ); |
368 |
map.put("200", "Failed to delete domain" ); |
369 |
map.put("201", "Failed to update domain" ); |
370 |
map.put("202", "Failed to get domain" ); |
371 |
map.put("203", "Failed to add temporary user" ); |
372 |
map.put("204", "Failed to delete temporary user" ); |
373 |
map.put("205", "Failed to update temporary user" ); |
374 |
map.put("206", "Failed to get temporary user" ); |
375 |
map.put("207", "Failed to reload database connection" ); |
376 |
map.put("208", "Failed to load LOG4J configuration file" ); |
377 |
map.put("209", "Failed to add application group" ); |
378 |
map.put("210", "Failed to delete application group" ); |
379 |
map.put("211", "Failed to update application group" ); |
380 |
map.put("212", "Failed to get application group" ); |
381 |
map.put("213", "Failed to add user and application group" ); |
382 |
map.put("214", "Failed to delete user and application group" ); |
383 |
map.put("215", "Failed to update user and application group" ); |
384 |
map.put("216", "Failed to get user and application group" ); |
385 |
map.put("217", "Failed to add zone" ); |
386 |
map.put("218", "Failed to delete zone" ); |
387 |
map.put("219", "Failed to update zone" ); |
388 |
map.put("220", "Failed to get zone" ); |
389 |
map.put("221", "Failed to add license" ); |
390 |
map.put("222", "Failed to delete license" ); |
391 |
map.put("223", "Failed to update license" ); |
392 |
map.put("224", "Failed to get license" ); |
393 |
map.put("225", "Failed to initialize LDAP" ); |
394 |
// end text here
|
395 |
|
396 |
return map;
|
397 |
} |
398 |
|
399 |
//Gemalto authentication mode
|
400 |
public static HashMap <String,Integer> authModeMapInstance = null; |
401 |
|
402 |
public static HashMap<String,Integer> getAuthInstance() |
403 |
{ |
404 |
if (authModeMapInstance==null) |
405 |
{ |
406 |
authModeMapInstance = new HashMap<String,Integer>(); |
407 |
|
408 |
authModeMapInstance.put("AUTH_HOTP", 0x00000001);//Event based. Not in use. |
409 |
authModeMapInstance.put("AUTH_HOTP2", 0x00000002);//Event based. Not in use. |
410 |
authModeMapInstance.put("AUTH_TOTP", 0x00000004);//Time based. |
411 |
authModeMapInstance.put("AUTH_OCRA", 0x00000008);//OCRA Challenge response based. |
412 |
} |
413 |
|
414 |
return authModeMapInstance;
|
415 |
} |
416 |
|
417 |
public static int getAuthenticationMode(String authMode) |
418 |
{ |
419 |
return getAuthInstance().get(authMode);
|
420 |
} |
421 |
|
422 |
/**
|
423 |
* defaultDateFormat = "dd-MM-yyyy HH:mm:ss";
|
424 |
*/
|
425 |
public static final SimpleDateFormat defaultDateFormat = new SimpleDateFormat( |
426 |
"dd-MM-yyyy HH:mm:ss");
|
427 |
|
428 |
public static final String TYPE_SYSTEM = "SYSTEM"; |
429 |
public static final int SYSTEM_ID = 0; |
430 |
|
431 |
} |