11package com .toopher ;
22
3+ import java .net .URISyntaxException ;
34import java .nio .charset .Charset ;
45import java .util .*;
56import java .net .URLEncoder ;
@@ -187,7 +188,7 @@ public String getUserManagementUrl(String userName, Map<String, String> extras)
187188 * @throws SignatureValidationError Thrown when exceptional condition is encountered while validating data
188189 * @throws RequestError Thrown when postback resource type is invalid
189190 */
190- public Object processPostback (Map <String , String > params , String requestToken , Map <String , String > extras ) throws SignatureValidationError , RequestError {
191+ public Object processPostback (Map <String , String > params , String requestToken , Map <String , String > extras ) throws SignatureValidationError , RequestError , URISyntaxException {
191192 Map <String , String > toopherData = urlDecodeIframeData (params );
192193
193194 if (toopherData .containsKey ("error_code" )) {
@@ -201,7 +202,7 @@ public Object processPostback(Map<String, String> params, String requestToken, M
201202 } else {
202203 Map <String , String > validatedData = validateData (toopherData , requestToken , extras );
203204
204- ToopherApi toopherApi = new ToopherApi (consumerKey , consumerSecret );
205+ ToopherApi toopherApi = new ToopherApi (consumerKey , consumerSecret , baseUri );
205206 String resourceType = validatedData .get ("resource_type" );
206207 if (resourceType .equals ("authentication_request" )) {
207208 return new AuthenticationRequest (createAuthenticationRequestJson (validatedData ), toopherApi );
@@ -225,7 +226,7 @@ public Object processPostback(Map<String, String> params, String requestToken, M
225226 * @throws SignatureValidationError Thrown when exceptional condition is encountered while validating data
226227 * @throws RequestError Thrown when postback resource type is invalid
227228 */
228- public Object processPostback (Map <String , String > params , String requestToken ) throws SignatureValidationError , RequestError {
229+ public Object processPostback (Map <String , String > params , String requestToken ) throws SignatureValidationError , RequestError , URISyntaxException {
229230 return processPostback (params , requestToken , new HashMap <String , String >());
230231 }
231232
@@ -237,7 +238,7 @@ public Object processPostback(Map<String, String> params, String requestToken) t
237238 * @throws SignatureValidationError Thrown when exceptional condition is encountered while validating data
238239 * @throws RequestError Thrown when postback resource type is invalid
239240 */
240- public Object processPostback (Map <String , String > params ) throws SignatureValidationError , RequestError {
241+ public Object processPostback (Map <String , String > params ) throws SignatureValidationError , RequestError , URISyntaxException {
241242 return processPostback (params , null );
242243 }
243244
0 commit comments