• R/O
  • SSH
  • HTTPS

sso-proxy: コミット


コミットメタ情報

リビジョン15 (tree)
日時2008-10-06 08:49:09
作者shinsuke

ログメッセージ

refactoring.

変更サマリ

差分

--- sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/SSOProxyConstraints.java (revision 14)
+++ sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/SSOProxyConstraints.java (nonexistent)
@@ -1,65 +0,0 @@
1-package jp.sf.ssoproxy;
2-
3-public class SSOProxyConstraints {
4- public static final String PREFIX = "ssoproxy.";
5-
6- public static final String STORED_COOKIE_LIST = PREFIX
7- + "StoredCookieList_";
8-
9- public static final String MIME_TYPE_PARAM = PREFIX + "MimeType";
10-
11- public static final String RESPONSE_HEADERS_PARAM = PREFIX
12- + "ResponseHeaders";
13-
14- public static final String RESPONSE_BODY_FILE_PARAM = PREFIX
15- + "ResponseBodyFile";
16-
17- public static final String RESPONSE_BODY_INPUT_STREAM_PARAM = PREFIX
18- + "ResponseBodyInputStream";
19-
20- public static final String LOGIN_BODY_FILE_PARAM = PREFIX + "LoginBodyFile";
21-
22- public static final String LOGIN_BODY_INPUT_STREAM_PARAM = PREFIX
23- + "LoginBodyInputStream";
24-
25- public static final String STATUS_CODE_PARAM = PREFIX + "StatusCode";
26-
27- public static final String INPUT_ENCODING_PARAM = PREFIX + "InputEncoding";
28-
29- public static final String CONTENT_TYPE_ENCODING_PARAM = PREFIX
30- + "ContentTypeEncoding";
31-
32- public static final String URL_PARAM = PREFIX + "Url";
33-
34- public static final String ORIGINAL_URL_PARAM = PREFIX + "OriginalUrl";
35-
36- public static final String OUTPUT_ENCODING_PARAM = PREFIX
37- + "OutputEncoding";
38-
39- public static final String PROXY_CONFIG_PARAM = PREFIX + "ProxyConfig";
40-
41- public static final String POST_METHOD = "POST";
42-
43- public static final String GET_METHOD = "GET";
44-
45- public static final String REQUEST_PARAM_QUERY_SEPARATOR = "&";
46-
47- public static final String REQUEST_PARAM_URL_SEPARATOR = "?";
48-
49- public static final String REQUEST_PARAM_EQUAL = "=";
50-
51- public static final String CURRENT_REMOTE_USER = "CurrentRemoteUser";
52-
53- public static final String ERROR_CODE = "ErrorCode";
54-
55- public static final String ERROR_MESSAGE = "ErrorMessage";
56-
57- public static final String SYSTEM_LOCALE_KEY = "sytemLocale";
58-
59- public static final String ERROR_JSP_KEY = "errorPage";
60-
61- public static final String DEFAULT_ERROR_JSP = "/error.jsp";
62-
63- public static final String CURRENT_REMOTE_USER_KEY = "currentUserKey";
64-
65-}
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
--- sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/access/impl/AccessManagerImpl.java (revision 14)
+++ sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/access/impl/AccessManagerImpl.java (revision 15)
@@ -14,7 +14,7 @@
1414 import javax.servlet.http.HttpServletResponse;
1515 import javax.servlet.http.HttpSession;
1616
17-import jp.sf.ssoproxy.SSOProxyConstraints;
17+import jp.sf.ssoproxy.SSOProxyConstants;
1818 import jp.sf.ssoproxy.access.AccessException;
1919 import jp.sf.ssoproxy.access.AccessManager;
2020 import jp.sf.ssoproxy.access.ResponseHeader;
@@ -133,7 +133,7 @@
133133
134134 File responseBodyFile = File.createTempFile(RESPONSE_BODY_FILE_PREFIX,
135135 TEMP_FILE_SUFFIX);
136- resultMap.put(SSOProxyConstraints.RESPONSE_BODY_FILE_PARAM,
136+ resultMap.put(SSOProxyConstants.RESPONSE_BODY_FILE_PARAM,
137137 responseBodyFile);
138138
139139 DeferredFileOutputStream dfos = new DeferredFileOutputStream(
@@ -140,7 +140,7 @@
140140 getDownloadThreshold(), responseBodyFile);
141141 IOUtils.copy(inputStream, dfos);
142142 if (!dfos.isThresholdExceeded()) {
143- resultMap.put(SSOProxyConstraints.RESPONSE_BODY_INPUT_STREAM_PARAM,
143+ resultMap.put(SSOProxyConstants.RESPONSE_BODY_INPUT_STREAM_PARAM,
144144 new ByteArrayInputStream(dfos.getData()));
145145 return;
146146 }
@@ -147,7 +147,7 @@
147147 dfos.flush();
148148 IOUtils.closeQuietly(dfos);
149149
150- resultMap.put(SSOProxyConstraints.RESPONSE_BODY_INPUT_STREAM_PARAM,
150+ resultMap.put(SSOProxyConstants.RESPONSE_BODY_INPUT_STREAM_PARAM,
151151 new FileInputStream(responseBodyFile));
152152 }
153153
@@ -159,20 +159,20 @@
159159
160160 File responseBodyFile = File.createTempFile(RESPONSE_BODY_FILE_PREFIX,
161161 TEMP_FILE_SUFFIX);
162- resultMap.put(SSOProxyConstraints.RESPONSE_BODY_FILE_PARAM,
162+ resultMap.put(SSOProxyConstants.RESPONSE_BODY_FILE_PARAM,
163163 responseBodyFile);
164164
165165 File loginBodyFile = File.createTempFile(LOGIN_BODY_FILE_PREFIX,
166166 TEMP_FILE_SUFFIX);
167- resultMap.put(SSOProxyConstraints.LOGIN_BODY_FILE_PARAM, loginBodyFile);
167+ resultMap.put(SSOProxyConstants.LOGIN_BODY_FILE_PARAM, loginBodyFile);
168168
169169 DeferredFileOutputStream dfos = new DeferredFileOutputStream(
170170 getDownloadThreshold(), responseBodyFile);
171171 IOUtils.copy(inputStream, dfos);
172172 if (!dfos.isThresholdExceeded()) {
173- resultMap.put(SSOProxyConstraints.RESPONSE_BODY_INPUT_STREAM_PARAM,
173+ resultMap.put(SSOProxyConstants.RESPONSE_BODY_INPUT_STREAM_PARAM,
174174 new ByteArrayInputStream(dfos.getData()));
175- resultMap.put(SSOProxyConstraints.LOGIN_BODY_INPUT_STREAM_PARAM,
175+ resultMap.put(SSOProxyConstants.LOGIN_BODY_INPUT_STREAM_PARAM,
176176 new ByteArrayInputStream(dfos.getData()));
177177 return;
178178 }
@@ -179,9 +179,9 @@
179179 dfos.flush();
180180 IOUtils.closeQuietly(dfos);
181181
182- resultMap.put(SSOProxyConstraints.RESPONSE_BODY_INPUT_STREAM_PARAM,
182+ resultMap.put(SSOProxyConstants.RESPONSE_BODY_INPUT_STREAM_PARAM,
183183 new FileInputStream(responseBodyFile));
184- resultMap.put(SSOProxyConstraints.LOGIN_BODY_INPUT_STREAM_PARAM,
184+ resultMap.put(SSOProxyConstants.LOGIN_BODY_INPUT_STREAM_PARAM,
185185 new FileInputStream(loginBodyFile));
186186 }
187187
@@ -189,13 +189,13 @@
189189 int result) throws IOException {
190190 Map<String, Object> resultMap = new HashMap<String, Object>();
191191
192- resultMap.put(SSOProxyConstraints.STATUS_CODE_PARAM, result);
192+ resultMap.put(SSOProxyConstants.STATUS_CODE_PARAM, result);
193193 Header[] responseHeaders = httpMethod.getResponseHeaders();
194194 List<ResponseHeader> responseHeaderList = new ArrayList<ResponseHeader>();
195195 for (int i = 0; i < responseHeaders.length; i++) {
196196 responseHeaderList.add(new ResponseHeader(responseHeaders[i]));
197197 }
198- resultMap.put(SSOProxyConstraints.RESPONSE_HEADERS_PARAM,
198+ resultMap.put(SSOProxyConstants.RESPONSE_HEADERS_PARAM,
199199 responseHeaderList);
200200 // TODO response footer?
201201 // content type
@@ -221,14 +221,14 @@
221221 if (mimeType == null) {
222222 mimeType = DEFAULT_CONTENT_TYPE;
223223 }
224- resultMap.put(SSOProxyConstraints.MIME_TYPE_PARAM, mimeType);
225- resultMap.put(SSOProxyConstraints.URL_PARAM, url);
226- resultMap.put(SSOProxyConstraints.CONTENT_TYPE_ENCODING_PARAM,
224+ resultMap.put(SSOProxyConstants.MIME_TYPE_PARAM, mimeType);
225+ resultMap.put(SSOProxyConstants.URL_PARAM, url);
226+ resultMap.put(SSOProxyConstants.CONTENT_TYPE_ENCODING_PARAM,
227227 inputEncoding);
228228 if (inputEncoding == null) {
229229 inputEncoding = httpMethod.getParams().getContentCharset();
230230 }
231- resultMap.put(SSOProxyConstraints.INPUT_ENCODING_PARAM, inputEncoding);
231+ resultMap.put(SSOProxyConstants.INPUT_ENCODING_PARAM, inputEncoding);
232232
233233 return resultMap;
234234 }
@@ -242,7 +242,7 @@
242242
243243 HttpClient httpclient = getHttpClient(hostConfig);
244244
245- String cookieMapName = SSOProxyConstraints.STORED_COOKIE_LIST
245+ String cookieMapName = SSOProxyConstants.STORED_COOKIE_LIST
246246 + hostConfig.getName();
247247
248248 HttpSession httpSession = request.getSession();
@@ -249,10 +249,10 @@
249249 setCookiesToServer(httpSession, cookieMapName, httpclient);
250250
251251 HttpMethod httpMethod = null;
252- if (SSOProxyConstraints.GET_METHOD.equals(request.getMethod())) {
252+ if (SSOProxyConstants.GET_METHOD.equals(request.getMethod())) {
253253 httpMethod = UrlBuilderUtil.buildGetMethod(url, request
254254 .getParameterMap(), encoding);
255- } else if (SSOProxyConstraints.POST_METHOD.equals(request.getMethod())) {
255+ } else if (SSOProxyConstants.POST_METHOD.equals(request.getMethod())) {
256256 httpMethod = UrlBuilderUtil.buildPostMethod(url, request
257257 .getParameterMap(), encoding);
258258 } else {
@@ -292,7 +292,7 @@
292292
293293 HttpClient httpclient = getHttpClient(hostConfig);
294294
295- String cookieListName = SSOProxyConstraints.STORED_COOKIE_LIST
295+ String cookieListName = SSOProxyConstants.STORED_COOKIE_LIST
296296 + hostConfig.getName();
297297
298298 HttpSession httpSession = request.getSession();
@@ -338,7 +338,7 @@
338338
339339 HttpClient httpclient = getHttpClient(hostConfig);
340340
341- String cookieMapName = SSOProxyConstraints.STORED_COOKIE_LIST
341+ String cookieMapName = SSOProxyConstants.STORED_COOKIE_LIST
342342 + hostConfig.getName();
343343
344344 HttpSession httpSession = request.getSession();
@@ -386,9 +386,9 @@
386386 throws AccessException {
387387 // content type
388388 String mimeType = (String) resultMap
389- .get(SSOProxyConstraints.MIME_TYPE_PARAM);
389+ .get(SSOProxyConstants.MIME_TYPE_PARAM);
390390 String contentTypeEncoding = (String) resultMap
391- .get(SSOProxyConstraints.CONTENT_TYPE_ENCODING_PARAM);
391+ .get(SSOProxyConstants.CONTENT_TYPE_ENCODING_PARAM);
392392 StringBuilder contentType = new StringBuilder(mimeType);
393393 if (contentTypeEncoding != null) {
394394 contentType.append("; charset=").append(contentTypeEncoding);
@@ -397,7 +397,7 @@
397397
398398 // headers
399399 List<ResponseHeader> responseHeaderList = (List<ResponseHeader>) resultMap
400- .get(SSOProxyConstraints.RESPONSE_HEADERS_PARAM);
400+ .get(SSOProxyConstants.RESPONSE_HEADERS_PARAM);
401401 for (ResponseHeader responseHeader : responseHeaderList) {
402402 if (SET_COOKIE_HEADER.equals(responseHeader.getName())
403403 || SET_COOKIE2_HEADER.equals(responseHeader.getName())) {
@@ -421,18 +421,18 @@
421421 }
422422
423423 Map<String, Object> props = new HashMap<String, Object>();
424- props.put(SSOProxyConstraints.URL_PARAM, resultMap
425- .get(SSOProxyConstraints.URL_PARAM));
426- props.put(SSOProxyConstraints.INPUT_ENCODING_PARAM, resultMap
427- .get(SSOProxyConstraints.INPUT_ENCODING_PARAM));
428- props.put(SSOProxyConstraints.OUTPUT_ENCODING_PARAM, resultMap
429- .get(SSOProxyConstraints.OUTPUT_ENCODING_PARAM));
430- props.put(SSOProxyConstraints.PROXY_CONFIG_PARAM, proxyConfig);
424+ props.put(SSOProxyConstants.URL_PARAM, resultMap
425+ .get(SSOProxyConstants.URL_PARAM));
426+ props.put(SSOProxyConstants.INPUT_ENCODING_PARAM, resultMap
427+ .get(SSOProxyConstants.INPUT_ENCODING_PARAM));
428+ props.put(SSOProxyConstants.OUTPUT_ENCODING_PARAM, resultMap
429+ .get(SSOProxyConstants.OUTPUT_ENCODING_PARAM));
430+ props.put(SSOProxyConstants.PROXY_CONFIG_PARAM, proxyConfig);
431431 // props.put(SSOProxyConstraints.REQUEST_PARAM, request);
432432 // props.put(SSOProxyConstraints.RESPONSE_PARAM, response);
433433
434434 InputStream inputStream = (InputStream) resultMap
435- .get(SSOProxyConstraints.RESPONSE_BODY_INPUT_STREAM_PARAM);
435+ .get(SSOProxyConstants.RESPONSE_BODY_INPUT_STREAM_PARAM);
436436 try {
437437 if (inputStream != null) {
438438 forwarder.forward(props, inputStream, response
@@ -454,13 +454,13 @@
454454 String redirectLocation;
455455 redirectLocation = getResponseHeaderValue(
456456 (List<ResponseHeader>) resultMap
457- .get(SSOProxyConstraints.RESPONSE_HEADERS_PARAM),
457+ .get(SSOProxyConstants.RESPONSE_HEADERS_PARAM),
458458 LOCATION_HEADER);
459459 if (redirectLocation != null) {
460460 // TODO headers
461461 try {
462462 response.setStatus((Integer) resultMap
463- .get(SSOProxyConstraints.STATUS_CODE_PARAM));
463+ .get(SSOProxyConstants.STATUS_CODE_PARAM));
464464 response.sendRedirect(proxyConfig
465465 .buildProxyUrl(redirectLocation));
466466 } catch (IOException e) {
@@ -490,25 +490,25 @@
490490 }
491491
492492 InputStream responseBodyInputStream = (InputStream) resultMap
493- .get(SSOProxyConstraints.RESPONSE_BODY_INPUT_STREAM_PARAM);
493+ .get(SSOProxyConstants.RESPONSE_BODY_INPUT_STREAM_PARAM);
494494 if (responseBodyInputStream != null) {
495495 IOUtils.closeQuietly(responseBodyInputStream);
496496 }
497497
498498 File responseBodyFile = (File) resultMap
499- .get(SSOProxyConstraints.RESPONSE_BODY_FILE_PARAM);
499+ .get(SSOProxyConstants.RESPONSE_BODY_FILE_PARAM);
500500 if (responseBodyFile != null) {
501501 FileUtils.deleteQuietly(responseBodyFile);
502502 }
503503
504504 InputStream loginBodyInputStream = (InputStream) resultMap
505- .get(SSOProxyConstraints.LOGIN_BODY_INPUT_STREAM_PARAM);
505+ .get(SSOProxyConstants.LOGIN_BODY_INPUT_STREAM_PARAM);
506506 if (loginBodyInputStream != null) {
507507 IOUtils.closeQuietly(loginBodyInputStream);
508508 }
509509
510510 File loginBodyFile = (File) resultMap
511- .get(SSOProxyConstraints.LOGIN_BODY_FILE_PARAM);
511+ .get(SSOProxyConstants.LOGIN_BODY_FILE_PARAM);
512512 if (loginBodyFile != null) {
513513 FileUtils.deleteQuietly(loginBodyFile);
514514 }
--- sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/SSOProxyConstants.java (nonexistent)
+++ sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/SSOProxyConstants.java (revision 15)
@@ -0,0 +1,76 @@
1+package jp.sf.ssoproxy;
2+
3+import jp.sf.ssoproxy.cookie.StandardBrowserSpec;
4+
5+import org.apache.commons.httpclient.cookie.CookiePolicy;
6+
7+public class SSOProxyConstants {
8+
9+ public static final String PREFIX = "ssoproxy.";
10+
11+ public static final String STANDARD_BROWSER = "browser";
12+
13+ public static final String STORED_COOKIE_LIST = PREFIX
14+ + "StoredCookieList_";
15+
16+ public static final String MIME_TYPE_PARAM = PREFIX + "MimeType";
17+
18+ public static final String RESPONSE_HEADERS_PARAM = PREFIX
19+ + "ResponseHeaders";
20+
21+ public static final String RESPONSE_BODY_FILE_PARAM = PREFIX
22+ + "ResponseBodyFile";
23+
24+ public static final String RESPONSE_BODY_INPUT_STREAM_PARAM = PREFIX
25+ + "ResponseBodyInputStream";
26+
27+ public static final String LOGIN_BODY_FILE_PARAM = PREFIX + "LoginBodyFile";
28+
29+ public static final String LOGIN_BODY_INPUT_STREAM_PARAM = PREFIX
30+ + "LoginBodyInputStream";
31+
32+ public static final String STATUS_CODE_PARAM = PREFIX + "StatusCode";
33+
34+ public static final String INPUT_ENCODING_PARAM = PREFIX + "InputEncoding";
35+
36+ public static final String CONTENT_TYPE_ENCODING_PARAM = PREFIX
37+ + "ContentTypeEncoding";
38+
39+ public static final String URL_PARAM = PREFIX + "Url";
40+
41+ public static final String ORIGINAL_URL_PARAM = PREFIX + "OriginalUrl";
42+
43+ public static final String OUTPUT_ENCODING_PARAM = PREFIX
44+ + "OutputEncoding";
45+
46+ public static final String PROXY_CONFIG_PARAM = PREFIX + "ProxyConfig";
47+
48+ public static final String POST_METHOD = "POST";
49+
50+ public static final String GET_METHOD = "GET";
51+
52+ public static final String REQUEST_PARAM_QUERY_SEPARATOR = "&";
53+
54+ public static final String REQUEST_PARAM_URL_SEPARATOR = "?";
55+
56+ public static final String REQUEST_PARAM_EQUAL = "=";
57+
58+ public static final String CURRENT_REMOTE_USER = "CurrentRemoteUser";
59+
60+ public static final String ERROR_CODE = "ErrorCode";
61+
62+ public static final String ERROR_MESSAGE = "ErrorMessage";
63+
64+ public static final String SYSTEM_LOCALE_KEY = "sytemLocale";
65+
66+ public static final String ERROR_JSP_KEY = "errorPage";
67+
68+ public static final String DEFAULT_ERROR_JSP = "/error.jsp";
69+
70+ public static final String CURRENT_REMOTE_USER_KEY = "currentUserKey";
71+
72+ static {
73+ CookiePolicy.registerCookieSpec(STANDARD_BROWSER,
74+ StandardBrowserSpec.class);
75+ }
76+}
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
--- sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/servlet/ProxyServlet.java (revision 14)
+++ sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/servlet/ProxyServlet.java (revision 15)
@@ -1,5 +1,6 @@
11 package jp.sf.ssoproxy.servlet;
22
3+import java.io.File;
34 import java.io.IOException;
45 import java.io.InputStream;
56 import java.io.UnsupportedEncodingException;
@@ -11,7 +12,7 @@
1112 import javax.servlet.http.HttpServletRequest;
1213 import javax.servlet.http.HttpServletResponse;
1314
14-import jp.sf.ssoproxy.SSOProxyConstraints;
15+import jp.sf.ssoproxy.SSOProxyConstants;
1516 import jp.sf.ssoproxy.access.AccessManager;
1617 import jp.sf.ssoproxy.config.AuthConfig;
1718 import jp.sf.ssoproxy.config.HostConfig;
@@ -18,6 +19,8 @@
1819 import jp.sf.ssoproxy.config.ProxyConfig;
1920 import jp.sf.ssoproxy.util.ErrorHandlingUtil;
2021
22+import org.apache.commons.fileupload.disk.DiskFileItemFactory;
23+import org.apache.commons.fileupload.servlet.ServletFileUpload;
2124 import org.seasar.framework.container.S2Container;
2225 import org.seasar.framework.container.factory.SingletonS2ContainerFactory;
2326
@@ -31,17 +34,19 @@
3134
3235 private Locale systemLocale;
3336
37+ private ServletFileUpload servletFileUpload;
38+
3439 @Override
3540 public void init() throws ServletException {
3641 // set an error page
3742 errorPage = getServletConfig().getInitParameter(
38- SSOProxyConstraints.ERROR_JSP_KEY);
43+ SSOProxyConstants.ERROR_JSP_KEY);
3944 if (errorPage == null) {
40- errorPage = SSOProxyConstraints.DEFAULT_ERROR_JSP;
45+ errorPage = SSOProxyConstants.DEFAULT_ERROR_JSP;
4146 }
4247 // set a system locale
4348 String value = getServletConfig().getInitParameter(
44- SSOProxyConstraints.SYSTEM_LOCALE_KEY);
49+ SSOProxyConstants.SYSTEM_LOCALE_KEY);
4550 if (value != null) {
4651 try {
4752 String[] values = value.split("_");
@@ -60,6 +65,25 @@
6065 } else {
6166 systemLocale = Locale.ENGLISH;
6267 }
68+
69+ // Create a factory for disk-based file items
70+ DiskFileItemFactory factory = new DiskFileItemFactory();
71+
72+ // Set factory constraints
73+ String sizeThreshold = getServletConfig().getInitParameter(
74+ "uploadSizeThreshold");
75+ if (sizeThreshold != null) {
76+ factory.setSizeThreshold(Integer.parseInt(sizeThreshold));
77+ }
78+ String repositoryPath = getServletConfig().getInitParameter(
79+ "uploadRepositoryPath");
80+ if (repositoryPath != null) {
81+ factory.setRepository(new File(repositoryPath));
82+ }
83+
84+ // Create a new file upload handler
85+ servletFileUpload = new ServletFileUpload(factory);
86+
6387 }
6488
6589 @Override
@@ -130,38 +154,46 @@
130154 return;
131155 }
132156
157+ // Check that we have a file upload request
158+ boolean isMultipart = ServletFileUpload.isMultipartContent(request);
159+
133160 Map<String, Object> resultMap = null;
134161 try {
135162 String url = hostConfig.buildUrl(pathInfo.substring(actualPathPos));
136- // TODO the url has request parameters or not when checking it in a following method...
137- AuthConfig authConfig = hostConfig.getAuthConfig(request
138- .getMethod(), url, request.getParameterMap());
163+ if (isMultipart) {
139164
140- // check a login page
141- if (authConfig != null) {
142- // Check a login page
143- resultMap = accessManager.sendLoginPageRequest(request,
144- hostConfig, authConfig);
145- int statusCode = ((Integer) resultMap
146- .get(SSOProxyConstraints.STATUS_CODE_PARAM)).intValue();
147- if (statusCode == 200
148- && authConfig
149- .checkLoginPage((InputStream) resultMap
150- .get(SSOProxyConstraints.LOGIN_BODY_INPUT_STREAM_PARAM))) {
151- // release result
152- accessManager.release(resultMap);
153- // Send auth info
154- resultMap = accessManager.sendAuthPageRequest(request,
165+ } else {
166+ // TODO the url has request parameters or not when checking it in a following method...
167+ AuthConfig authConfig = hostConfig.getAuthConfig(request
168+ .getMethod(), url, request.getParameterMap());
169+
170+ // check a login page
171+ if (authConfig != null) {
172+ // Check a login page
173+ resultMap = accessManager.sendLoginPageRequest(request,
155174 hostConfig, authConfig);
175+ int statusCode = ((Integer) resultMap
176+ .get(SSOProxyConstants.STATUS_CODE_PARAM))
177+ .intValue();
178+ if (statusCode == 200
179+ && authConfig
180+ .checkLoginPage((InputStream) resultMap
181+ .get(SSOProxyConstants.LOGIN_BODY_INPUT_STREAM_PARAM))) {
182+ // release result
183+ accessManager.release(resultMap);
184+ // Send auth info
185+ resultMap = accessManager.sendAuthPageRequest(request,
186+ hostConfig, authConfig);
187+ }
188+ } else {
189+ // get a content from a back-end server
190+ resultMap = accessManager.sendRequest(request, hostConfig,
191+ url, hostConfig.getEncoding());
156192 }
157- } else {
158- // get a content from a back-end server
159- resultMap = accessManager.sendRequest(request, hostConfig, url,
160- hostConfig.getEncoding());
161193 }
162194
163195 int statusCode = ((Integer) resultMap
164- .get(SSOProxyConstraints.STATUS_CODE_PARAM)).intValue();
196+ .get(SSOProxyConstants.STATUS_CODE_PARAM)).intValue();
165197 // redirect
166198 if (isRedirectStatusCode(statusCode)) {
167199 accessManager.redirectResponse(request, response, resultMap,
@@ -178,7 +210,7 @@
178210 accessManager.sendResponse(request, response, resultMap,
179211 proxyConfig, hostConfigName, hostConfig
180212 .getForwarderName((String) resultMap
181- .get(SSOProxyConstraints.MIME_TYPE_PARAM)));
213+ .get(SSOProxyConstants.MIME_TYPE_PARAM)));
182214 // flush
183215 response.flushBuffer();
184216 } catch (Exception e) {
--- sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/config/impl/HostConfigImpl.java (revision 14)
+++ sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/config/impl/HostConfigImpl.java (revision 15)
@@ -3,6 +3,7 @@
33 import java.util.HashMap;
44 import java.util.Map;
55
6+import jp.sf.ssoproxy.SSOProxyConstants;
67 import jp.sf.ssoproxy.config.AuthConfig;
78 import jp.sf.ssoproxy.config.ConfigException;
89 import jp.sf.ssoproxy.config.HostConfig;
@@ -49,7 +50,7 @@
4950 encoding = UTF_8;
5051 accessManagerName = DEFAULT_ACCESS_MANAGER;
5152 forwarderMap = new HashMap<String, String>();
52- cookiePolicy = CookiePolicy.BROWSER_COMPATIBILITY;
53+ cookiePolicy = SSOProxyConstants.STANDARD_BROWSER;
5354 singleCookieHeader = false;
5455 connectionTimeout = 30000;
5556 }
--- sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/config/impl/AbstractAuthConfig.java (revision 14)
+++ sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/config/impl/AbstractAuthConfig.java (revision 15)
@@ -9,7 +9,7 @@
99
1010 import javax.servlet.http.HttpServletRequest;
1111
12-import jp.sf.ssoproxy.SSOProxyConstraints;
12+import jp.sf.ssoproxy.SSOProxyConstants;
1313 import jp.sf.ssoproxy.config.AuthConfig;
1414 import jp.sf.ssoproxy.config.ConfigException;
1515 import jp.sf.ssoproxy.util.UrlBuilderUtil;
@@ -94,15 +94,15 @@
9494 */
9595 public HttpMethod buildLoginHttpMethod(HttpServletRequest request)
9696 throws ConfigException {
97- if (SSOProxyConstraints.POST_METHOD.equals(loginPageMethod)) {
97+ if (SSOProxyConstants.POST_METHOD.equals(loginPageMethod)) {
9898 return UrlBuilderUtil.buildPostMethod(loginPageUrl,
99- getParameterMap(request, SSOProxyConstraints.GET_METHOD,
99+ getParameterMap(request, SSOProxyConstants.GET_METHOD,
100100 loginPageDataList),
101- getParameterMap(request, SSOProxyConstraints.POST_METHOD,
101+ getParameterMap(request, SSOProxyConstants.POST_METHOD,
102102 loginPageDataList), loginPageEncoding);
103- } else if (SSOProxyConstraints.GET_METHOD.equals(loginPageMethod)) {
103+ } else if (SSOProxyConstants.GET_METHOD.equals(loginPageMethod)) {
104104 return UrlBuilderUtil.buildGetMethod(loginPageUrl,
105- getParameterMap(request, SSOProxyConstraints.GET_METHOD,
105+ getParameterMap(request, SSOProxyConstants.GET_METHOD,
106106 loginPageDataList), loginPageEncoding);
107107 }
108108 // error
@@ -114,14 +114,14 @@
114114 */
115115 public HttpMethod buildAuthHttpMethod(HttpServletRequest request)
116116 throws ConfigException {
117- if (SSOProxyConstraints.POST_METHOD.equals(authPageMethod)) {
117+ if (SSOProxyConstants.POST_METHOD.equals(authPageMethod)) {
118118 return UrlBuilderUtil.buildPostMethod(authPageUrl, getParameterMap(
119- request, SSOProxyConstraints.GET_METHOD, authPageDataList),
120- getParameterMap(request, SSOProxyConstraints.POST_METHOD,
119+ request, SSOProxyConstants.GET_METHOD, authPageDataList),
120+ getParameterMap(request, SSOProxyConstants.POST_METHOD,
121121 authPageDataList), authPageEncoding);
122- } else if (SSOProxyConstraints.GET_METHOD.equals(authPageMethod)) {
122+ } else if (SSOProxyConstants.GET_METHOD.equals(authPageMethod)) {
123123 return UrlBuilderUtil.buildGetMethod(authPageUrl, getParameterMap(
124- request, SSOProxyConstraints.GET_METHOD, authPageDataList),
124+ request, SSOProxyConstants.GET_METHOD, authPageDataList),
125125 authPageEncoding);
126126 }
127127 // error
--- sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/config/impl/JetspeedAuthConfigImpl.java (revision 14)
+++ sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/config/impl/JetspeedAuthConfigImpl.java (revision 15)
@@ -4,7 +4,7 @@
44
55 import javax.servlet.http.HttpServletRequest;
66
7-import jp.sf.ssoproxy.SSOProxyConstraints;
7+import jp.sf.ssoproxy.SSOProxyConstants;
88 import jp.sf.ssoproxy.config.ConfigException;
99 import jp.sf.ssoproxy.util.JetspeedUtil;
1010
@@ -27,7 +27,7 @@
2727 if (usernameKey.equals(value)) {
2828 // from user attribute
2929 String remoteUser = (String) request.getSession().getAttribute(
30- SSOProxyConstraints.CURRENT_REMOTE_USER);
30+ SSOProxyConstants.CURRENT_REMOTE_USER);
3131 if (remoteUser == null) {
3232 // error
3333 throw new ConfigException("000009");
@@ -45,7 +45,7 @@
4545 } else if (passwordKey.equals(value)) {
4646 // from user attribute
4747 String remoteUser = (String) request.getSession().getAttribute(
48- SSOProxyConstraints.CURRENT_REMOTE_USER);
48+ SSOProxyConstants.CURRENT_REMOTE_USER);
4949 if (remoteUser == null) {
5050 // error
5151 throw new ConfigException("000011");
--- sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/filter/AbstractAuthFilter.java (revision 14)
+++ sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/filter/AbstractAuthFilter.java (revision 15)
@@ -12,7 +12,7 @@
1212 import javax.servlet.http.HttpServletRequest;
1313 import javax.servlet.http.HttpServletResponse;
1414
15-import jp.sf.ssoproxy.SSOProxyConstraints;
15+import jp.sf.ssoproxy.SSOProxyConstants;
1616 import jp.sf.ssoproxy.util.ErrorHandlingUtil;
1717
1818 public abstract class AbstractAuthFilter implements Filter {
@@ -26,20 +26,20 @@
2626 public void init(FilterConfig config) throws ServletException {
2727 // set an current user key
2828 currentUserKey = config
29- .getInitParameter(SSOProxyConstraints.CURRENT_REMOTE_USER_KEY);
29+ .getInitParameter(SSOProxyConstants.CURRENT_REMOTE_USER_KEY);
3030 if (currentUserKey == null) {
31- currentUserKey = SSOProxyConstraints.CURRENT_REMOTE_USER;
31+ currentUserKey = SSOProxyConstants.CURRENT_REMOTE_USER;
3232 }
3333
3434 // set an error page
35- errorPage = config.getInitParameter(SSOProxyConstraints.ERROR_JSP_KEY);
35+ errorPage = config.getInitParameter(SSOProxyConstants.ERROR_JSP_KEY);
3636 if (errorPage == null) {
37- errorPage = SSOProxyConstraints.DEFAULT_ERROR_JSP;
37+ errorPage = SSOProxyConstants.DEFAULT_ERROR_JSP;
3838 }
3939
4040 // set a system locale
4141 String value = config
42- .getInitParameter(SSOProxyConstraints.SYSTEM_LOCALE_KEY);
42+ .getInitParameter(SSOProxyConstants.SYSTEM_LOCALE_KEY);
4343 if (value != null) {
4444 try {
4545 String[] values = value.split("_");
--- sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/portlet/SSOEnablerPortlet.java (revision 14)
+++ sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/portlet/SSOEnablerPortlet.java (revision 15)
@@ -8,7 +8,7 @@
88 import javax.portlet.RenderRequest;
99 import javax.portlet.RenderResponse;
1010
11-import jp.sf.ssoproxy.SSOProxyConstraints;
11+import jp.sf.ssoproxy.SSOProxyConstants;
1212
1313 public class SSOEnablerPortlet extends GenericPortlet {
1414
@@ -17,7 +17,7 @@
1717 String remoteUser = request.getRemoteUser();
1818 if (remoteUser != null) {
1919 request.getPortletSession().setAttribute(
20- SSOProxyConstraints.CURRENT_REMOTE_USER, remoteUser,
20+ SSOProxyConstants.CURRENT_REMOTE_USER, remoteUser,
2121 PortletSession.APPLICATION_SCOPE);
2222 }
2323 }
--- sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/cookie/StandardBrowserSpec.java (nonexistent)
+++ sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/cookie/StandardBrowserSpec.java (revision 15)
@@ -0,0 +1,104 @@
1+package jp.sf.ssoproxy.cookie;
2+
3+import org.apache.commons.httpclient.Cookie;
4+import org.apache.commons.httpclient.cookie.CookieSpecBase;
5+import org.apache.commons.httpclient.cookie.MalformedCookieException;
6+
7+public class StandardBrowserSpec extends CookieSpecBase {
8+ public StandardBrowserSpec() {
9+ super();
10+ }
11+
12+ /**
13+ * Performs most common {@link Cookie} validation
14+ *
15+ * @param host the host from which the {@link Cookie} was received
16+ * @param port the port from which the {@link Cookie} was received
17+ * @param path the path from which the {@link Cookie} was received
18+ * @param secure <tt>true</tt> when the {@link Cookie} was received using a
19+ * secure connection
20+ * @param cookie The cookie to validate.
21+ * @throws MalformedCookieException if an exception occurs during
22+ * validation
23+ */
24+
25+ public void validate(String host, int port, String path, boolean secure,
26+ final Cookie cookie) throws MalformedCookieException {
27+
28+ LOG.trace("enter CookieSpecBase.validate("
29+ + "String, port, path, boolean, Cookie)");
30+ if (host == null) {
31+ throw new IllegalArgumentException("Host of origin may not be null");
32+ }
33+ if (host.trim().equals("")) {
34+ throw new IllegalArgumentException(
35+ "Host of origin may not be blank");
36+ }
37+ if (port < 0) {
38+ throw new IllegalArgumentException("Invalid port: " + port);
39+ }
40+ if (path == null) {
41+ throw new IllegalArgumentException(
42+ "Path of origin may not be null.");
43+ }
44+ if (path.trim().equals("")) {
45+ path = PATH_DELIM;
46+ }
47+ host = host.toLowerCase();
48+ // check version
49+ if (cookie.getVersion() < 0) {
50+ throw new MalformedCookieException("Illegal version number "
51+ + cookie.getValue());
52+ }
53+
54+ // security check... we musn't allow the server to give us an
55+ // invalid domain scope
56+
57+ // Validate the cookies domain attribute. NOTE: Domains without
58+ // any dots are allowed to support hosts on private LANs that don't
59+ // have DNS names. Since they have no dots, to domain-match the
60+ // request-host and domain must be identical for the cookie to sent
61+ // back to the origin-server.
62+ if (host.indexOf(".") >= 0) {
63+ // Not required to have at least two dots. RFC 2965.
64+ // A Set-Cookie2 with Domain=ajax.com will be accepted.
65+
66+ // domain must match host
67+ if (!host.endsWith(cookie.getDomain())) {
68+ String s = cookie.getDomain();
69+ if (s.startsWith(".")) {
70+ s = s.substring(1, s.length());
71+ }
72+ if (!host.equals(s)) {
73+ throw new MalformedCookieException(
74+ "Illegal domain attribute \"" + cookie.getDomain()
75+ + "\". Domain of origin: \"" + host + "\"");
76+ }
77+ }
78+ } else {
79+ if (!host.equals(cookie.getDomain())) {
80+ throw new MalformedCookieException(
81+ "Illegal domain attribute \"" + cookie.getDomain()
82+ + "\". Domain of origin: \"" + host + "\"");
83+ }
84+ }
85+
86+ // another security check... we musn't allow the server to give us a
87+ // cookie that doesn't match this path
88+
89+ int idx = path.lastIndexOf(PATH_DELIM);
90+ String requstPath = path;
91+ if (idx > 0) {
92+ requstPath = requstPath.substring(0, idx + 1);
93+ }
94+ if (cookie.getPath() != null && cookie.getPath().startsWith(requstPath)) {
95+ throw new MalformedCookieException("Illegal path attribute \""
96+ + cookie.getPath() + "\". Path of origin: \"" + path + "\"");
97+ }
98+ // if (!path.startsWith(cookie.getPath())) {
99+ // throw new MalformedCookieException(
100+ // "Illegal path attribute \"" + cookie.getPath()
101+ // + "\". Path of origin: \"" + path + "\"");
102+ // }
103+ }
104+}
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
--- sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/forwarder/impl/HtmlForwarder.java (revision 14)
+++ sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/forwarder/impl/HtmlForwarder.java (revision 15)
@@ -5,7 +5,7 @@
55 import java.io.OutputStreamWriter;
66 import java.util.Map;
77
8-import jp.sf.ssoproxy.SSOProxyConstraints;
8+import jp.sf.ssoproxy.SSOProxyConstants;
99 import jp.sf.ssoproxy.SSOProxyException;
1010 import jp.sf.ssoproxy.forwarder.Forwarder;
1111 import jp.sf.ssoproxy.forwarder.ForwarderException;
@@ -88,16 +88,16 @@
8888 getHtmlHandlerName());
8989
9090 String inputEncoding = (String) props
91- .get(SSOProxyConstraints.INPUT_ENCODING_PARAM);
91+ .get(SSOProxyConstants.INPUT_ENCODING_PARAM);
9292 if (inputEncoding == null) {
9393 inputEncoding = DEFAULT_INPUT_ENCODING;
9494 }
9595
9696 // set properties
97- htmlHandler.getProperties().put(SSOProxyConstraints.URL_PARAM,
98- props.get(SSOProxyConstraints.URL_PARAM));
99- htmlHandler.getProperties().put(SSOProxyConstraints.PROXY_CONFIG_PARAM,
100- props.get(SSOProxyConstraints.PROXY_CONFIG_PARAM));
97+ htmlHandler.getProperties().put(SSOProxyConstants.URL_PARAM,
98+ props.get(SSOProxyConstants.URL_PARAM));
99+ htmlHandler.getProperties().put(SSOProxyConstants.PROXY_CONFIG_PARAM,
100+ props.get(SSOProxyConstants.PROXY_CONFIG_PARAM));
101101
102102 InputSource inputSource = new InputSource(is);
103103 inputSource.setEncoding(inputEncoding);
@@ -124,7 +124,7 @@
124124 parser.parse(inputSource);
125125
126126 String encoding = (String) props
127- .get(SSOProxyConstraints.OUTPUT_ENCODING_PARAM);
127+ .get(SSOProxyConstants.OUTPUT_ENCODING_PARAM);
128128 if (encoding == null) {
129129 // encoding = DEFAULT_OUTPUT_ENCODING;
130130 encoding = inputEncoding;
@@ -143,7 +143,7 @@
143143 // } catch (IOException e) {
144144 // error
145145 throw new ForwarderException("000006", new Object[] { props
146- .get(SSOProxyConstraints.URL_PARAM) }, e);
146+ .get(SSOProxyConstants.URL_PARAM) }, e);
147147 }
148148 }
149149
--- sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/forwarder/impl/DirectForwarder.java (revision 14)
+++ sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/forwarder/impl/DirectForwarder.java (revision 15)
@@ -5,7 +5,7 @@
55 import java.io.OutputStream;
66 import java.util.Map;
77
8-import jp.sf.ssoproxy.SSOProxyConstraints;
8+import jp.sf.ssoproxy.SSOProxyConstants;
99 import jp.sf.ssoproxy.SSOProxyException;
1010 import jp.sf.ssoproxy.forwarder.Forwarder;
1111 import jp.sf.ssoproxy.forwarder.ForwarderException;
@@ -31,7 +31,7 @@
3131 } catch (IOException e) {
3232 // error
3333 throw new ForwarderException("000007", new Object[] { props
34- .get(SSOProxyConstraints.URL_PARAM) }, e);
34+ .get(SSOProxyConstants.URL_PARAM) }, e);
3535 }
3636 }
3737
--- sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/handler/element/BaseElementHandler.java (revision 14)
+++ sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/handler/element/BaseElementHandler.java (revision 15)
@@ -2,7 +2,7 @@
22
33 import java.util.Map;
44
5-import jp.sf.ssoproxy.SSOProxyConstraints;
5+import jp.sf.ssoproxy.SSOProxyConstants;
66 import jp.sf.ssoproxy.handler.html.HtmlHandler;
77 import jp.sf.ssoproxy.util.ElementHandlerUtil;
88
@@ -24,11 +24,11 @@
2424 if (ElementHandler.HREF_ATTR.equals(attrName)) {
2525 Map<String, Object> props = htmlHandler.getProperties();
2626 // store original url
27- props.put(SSOProxyConstraints.ORIGINAL_URL_PARAM, props
28- .get(SSOProxyConstraints.URL_PARAM));
27+ props.put(SSOProxyConstants.ORIGINAL_URL_PARAM, props
28+ .get(SSOProxyConstants.URL_PARAM));
2929 // replace current url
3030 String url = attributes.getValue(i);
31- props.put(SSOProxyConstraints.URL_PARAM, url);
31+ props.put(SSOProxyConstants.URL_PARAM, url);
3232 htmlHandler.write(ElementHandlerUtil.buildUrl(htmlHandler,
3333 url));
3434 } else {
--- sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/util/ElementHandlerUtil.java (revision 14)
+++ sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/util/ElementHandlerUtil.java (revision 15)
@@ -4,7 +4,7 @@
44 import java.net.URL;
55 import java.util.Map;
66
7-import jp.sf.ssoproxy.SSOProxyConstraints;
7+import jp.sf.ssoproxy.SSOProxyConstants;
88 import jp.sf.ssoproxy.config.ProxyConfig;
99 import jp.sf.ssoproxy.handler.html.HtmlHandler;
1010
@@ -11,7 +11,7 @@
1111 public class ElementHandlerUtil {
1212 public static String buildUrl(HtmlHandler htmlHandler, String url) {
1313 Map<String, Object> props = htmlHandler.getProperties();
14- String currentUrl = (String) props.get(SSOProxyConstraints.URL_PARAM);
14+ String currentUrl = (String) props.get(SSOProxyConstants.URL_PARAM);
1515 if (url.indexOf("://") < 0) {
1616 try {
1717 url = new URL(new URL(currentUrl), url).toString();
@@ -20,7 +20,7 @@
2020 }
2121 }
2222 ProxyConfig proxyConfig = (ProxyConfig) props
23- .get(SSOProxyConstraints.PROXY_CONFIG_PARAM);
23+ .get(SSOProxyConstants.PROXY_CONFIG_PARAM);
2424 return proxyConfig.buildProxyUrl(url);
2525 }
2626 }
--- sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/util/UrlBuilderUtil.java (revision 14)
+++ sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/util/UrlBuilderUtil.java (revision 15)
@@ -7,7 +7,7 @@
77 import java.util.List;
88 import java.util.Map;
99
10-import jp.sf.ssoproxy.SSOProxyConstraints;
10+import jp.sf.ssoproxy.SSOProxyConstants;
1111
1212 import org.apache.commons.httpclient.NameValuePair;
1313 import org.apache.commons.httpclient.methods.GetMethod;
@@ -26,7 +26,7 @@
2626 }
2727
2828 boolean alreadyAdded = false;
29- if (url.indexOf(SSOProxyConstraints.REQUEST_PARAM_URL_SEPARATOR) >= 0) {
29+ if (url.indexOf(SSOProxyConstants.REQUEST_PARAM_URL_SEPARATOR) >= 0) {
3030 alreadyAdded = true;
3131 }
3232
@@ -38,14 +38,14 @@
3838 for (int i = 0; i < value.length; i++) {
3939 if (alreadyAdded) {
4040 query
41- .append(SSOProxyConstraints.REQUEST_PARAM_QUERY_SEPARATOR);
41+ .append(SSOProxyConstants.REQUEST_PARAM_QUERY_SEPARATOR);
4242 } else {
4343 query
44- .append(SSOProxyConstraints.REQUEST_PARAM_URL_SEPARATOR);
44+ .append(SSOProxyConstants.REQUEST_PARAM_URL_SEPARATOR);
4545 alreadyAdded = true;
4646 }
4747 query.append(encode(key, encoding));
48- query.append(SSOProxyConstraints.REQUEST_PARAM_EQUAL);
48+ query.append(SSOProxyConstants.REQUEST_PARAM_EQUAL);
4949 query.append(encode(value[i], encoding));
5050 }
5151 }
--- sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/util/ErrorHandlingUtil.java (revision 14)
+++ sso-proxy/trunk/src/main/java/jp/sf/ssoproxy/util/ErrorHandlingUtil.java (revision 15)
@@ -8,7 +8,7 @@
88 import javax.servlet.http.HttpServletRequest;
99 import javax.servlet.http.HttpServletResponse;
1010
11-import jp.sf.ssoproxy.SSOProxyConstraints;
11+import jp.sf.ssoproxy.SSOProxyConstants;
1212 import jp.sf.ssoproxy.SSOProxyException;
1313 import jp.sf.ssoproxy.servlet.ProxyServlet;
1414
@@ -45,8 +45,8 @@
4545 // TODO response status code
4646 response.setStatus(500);
4747
48- request.setAttribute(SSOProxyConstraints.ERROR_CODE, errorCode);
49- request.setAttribute(SSOProxyConstraints.ERROR_MESSAGE, errorMessage);
48+ request.setAttribute(SSOProxyConstants.ERROR_CODE, errorCode);
49+ request.setAttribute(SSOProxyConstants.ERROR_MESSAGE, errorMessage);
5050
5151 RequestDispatcher rd = request.getRequestDispatcher(errorPage);
5252 rd.forward(request, response);
--- sso-proxy/trunk/pom.xml (revision 14)
+++ sso-proxy/trunk/pom.xml (revision 15)
@@ -141,6 +141,11 @@
141141 </exclusions>
142142 </dependency>
143143 <dependency>
144+ <groupId>commons-fileupload</groupId>
145+ <artifactId>commons-fileupload</artifactId>
146+ <version>1.2.1</version>
147+ </dependency>
148+ <dependency>
144149 <groupId>commons-httpclient</groupId>
145150 <artifactId>commons-httpclient</artifactId>
146151 <version>3.1</version>
旧リポジトリブラウザで表示