- Timestamp:
- 02/25/09 11:25:45 (19 months ago)
- Location:
- tools/routingservice/trunk/src/jp/co/orkney/restlet
- Files:
-
- 1 added
- 1 modified
-
WebRouting.java (modified) (4 diffs)
-
security/MD5SecurityHelper.java (added)
Legend:
- Unmodified
- Added
- Removed
-
tools/routingservice/trunk/src/jp/co/orkney/restlet/WebRouting.java
r258 r263 28 28 import jp.co.orkney.restlet.geo.ShortestPath; 29 29 import jp.co.orkney.restlet.geo.TravelingSalesPerson; 30 import jp.co.orkney.restlet.security.MD5SecurityHelper; 30 31 import jp.co.orkney.restlet.security.SecurityHelper; 31 32 import jp.co.orkney.restlet.util.DatabaseConnection; … … 80 81 static final String TSP = "traveling_sales_person"; 81 82 82 private String result = "";83 private String result = ""; 83 84 private MediaType resultFormat; 84 85 private Log log; … … 205 206 } 206 207 207 String encKey = configuration.getProvider().getAuthService().getParameter(Configuration.API_KEY).getValue();208 String apiKey = configuration.getProvider().getAuthService().getParameter(Configuration.API_KEY).getValue(); 208 209 String signature = configuration.getProvider().getAuthService().getParameter(Configuration.SIGNATURE).getValue(); 209 210 String clientId = configuration.getProvider().getAuthService().getParameter(Configuration.CLIENT_ID).getValue(); … … 211 212 try 212 213 { 213 if (!SecurityHelper.checkAPIKey((String) keys.get(clientId.toUpperCase()), encKey, signature, clientId, log)) 214 //if (!SecurityHelper.checkAPIKey((String) keys.get(clientId.toUpperCase()), encKey, signature, clientId, log)) 215 if (!MD5SecurityHelper.checkAPIKey(clientId, signature, apiKey, (String) keys.get(clientId.toUpperCase()), log)) 214 216 { 215 217 response.setStatus(Status.CLIENT_ERROR_FORBIDDEN);
