Changeset 263 for tools

Show
Ignore:
Timestamp:
02/25/09 11:25:45 (13 months ago)
Author:
anton
Message:

Auth service algorithm changed to md5

Location:
tools/routingservice/trunk/src/jp/co/orkney/restlet
Files:
1 added
1 modified

Legend:

Unmodified
Added
Removed
  • tools/routingservice/trunk/src/jp/co/orkney/restlet/WebRouting.java

    r258 r263  
    2828import jp.co.orkney.restlet.geo.ShortestPath; 
    2929import jp.co.orkney.restlet.geo.TravelingSalesPerson; 
     30import jp.co.orkney.restlet.security.MD5SecurityHelper; 
    3031import jp.co.orkney.restlet.security.SecurityHelper; 
    3132import jp.co.orkney.restlet.util.DatabaseConnection; 
     
    8081        static final String TSP = "traveling_sales_person"; 
    8182     
    82         private String result = ""; 
     83    private String result = ""; 
    8384        private MediaType resultFormat; 
    8485        private Log log; 
     
    205206                                                                } 
    206207 
    207                                                                 String encKey = configuration.getProvider().getAuthService().getParameter(Configuration.API_KEY).getValue(); 
     208                                                                String apiKey = configuration.getProvider().getAuthService().getParameter(Configuration.API_KEY).getValue(); 
    208209                                                                String signature = configuration.getProvider().getAuthService().getParameter(Configuration.SIGNATURE).getValue(); 
    209210                                                                String clientId = configuration.getProvider().getAuthService().getParameter(Configuration.CLIENT_ID).getValue(); 
     
    211212                                                                try 
    212213                                                                { 
    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)) 
    214216                                                                        { 
    215217                                                                                response.setStatus(Status.CLIENT_ERROR_FORBIDDEN);