accessorBuilder.setParameterLocation( getStoreLocation(service.getRequestUrl().location, responseParams)); accessorBuilder.setMethod(getStoreMethod(service.getRequestUrl().method, responseParams));
accessorBuilder.setParameterLocation( getStoreLocation(service.getRequestUrl().location, responseParams)); accessorBuilder.setMethod(getStoreMethod(service.getRequestUrl().method, responseParams));
accessorBuilder.setParameterLocation( getStoreLocation(service.getRequestUrl().location, responseParams)); accessorBuilder.setMethod(getStoreMethod(service.getRequestUrl().method, responseParams));
} else { accessorBuilder.setParameterLocation(AccessorInfo.OAuthParamLocation.URI_QUERY);
} else { accessorBuilder.setParameterLocation(AccessorInfo.OAuthParamLocation.URI_QUERY);
private OAuthServiceProvider loadProgrammaticConfig(OAuthArguments arguments, AccessorInfoBuilder accessorBuilder, OAuthResponseParams responseParams) throws OAuthRequestException { try { String paramLocationStr = arguments.getRequestOption(OAuthArguments.PARAM_LOCATION_PARAM, ""); Location l = Location.parse(paramLocationStr); accessorBuilder.setParameterLocation(getStoreLocation(l, responseParams)); String requestMethod = arguments.getRequestOption(OAuthArguments.REQUEST_METHOD_PARAM, "GET"); Method m = Method.parse(requestMethod); accessorBuilder.setMethod(getStoreMethod(m, responseParams)); String requestTokenUrl = arguments.getRequestOption(OAuthArguments.REQUEST_TOKEN_URL_PARAM); verifyUrl(requestTokenUrl, responseParams); String accessTokenUrl = arguments.getRequestOption(OAuthArguments.ACCESS_TOKEN_URL_PARAM); verifyUrl(accessTokenUrl, responseParams); String authorizationUrl = arguments.getRequestOption(OAuthArguments.AUTHORIZATION_URL_PARAM); verifyUrl(authorizationUrl, responseParams); return new OAuthServiceProvider(requestTokenUrl, authorizationUrl, accessTokenUrl); } catch (SpecParserException e) { // these exceptions have decent programmer readable messages throw new OAuthRequestException(OAuthError.BAD_OAUTH_CONFIGURATION, e.getMessage()); } }
} else { accessorBuilder.setParameterLocation(AccessorInfo.OAuthParamLocation.URI_QUERY);
private OAuthServiceProvider loadProgrammaticConfig(OAuthArguments arguments, AccessorInfoBuilder accessorBuilder, OAuthResponseParams responseParams) throws OAuthRequestException { try { String paramLocationStr = arguments.getRequestOption(OAuthArguments.PARAM_LOCATION_PARAM, ""); Location l = Location.parse(paramLocationStr); accessorBuilder.setParameterLocation(getStoreLocation(l, responseParams)); String requestMethod = arguments.getRequestOption(OAuthArguments.REQUEST_METHOD_PARAM, "GET"); Method m = Method.parse(requestMethod); accessorBuilder.setMethod(getStoreMethod(m, responseParams)); String requestTokenUrl = arguments.getRequestOption(OAuthArguments.REQUEST_TOKEN_URL_PARAM); verifyUrl(requestTokenUrl, responseParams); String accessTokenUrl = arguments.getRequestOption(OAuthArguments.ACCESS_TOKEN_URL_PARAM); verifyUrl(accessTokenUrl, responseParams); String authorizationUrl = arguments.getRequestOption(OAuthArguments.AUTHORIZATION_URL_PARAM); verifyUrl(authorizationUrl, responseParams); return new OAuthServiceProvider(requestTokenUrl, authorizationUrl, accessTokenUrl); } catch (SpecParserException e) { // these exceptions have decent programmer readable messages throw new OAuthRequestException(OAuthError.BAD_OAUTH_CONFIGURATION, e.getMessage()); } }
private OAuthServiceProvider loadProgrammaticConfig(OAuthArguments arguments, AccessorInfoBuilder accessorBuilder, OAuthResponseParams responseParams) throws OAuthRequestException { try { String paramLocationStr = arguments.getRequestOption(OAuthArguments.PARAM_LOCATION_PARAM, ""); Location l = Location.parse(paramLocationStr); accessorBuilder.setParameterLocation(getStoreLocation(l, responseParams)); String requestMethod = arguments.getRequestOption(OAuthArguments.REQUEST_METHOD_PARAM, "GET"); Method m = Method.parse(requestMethod); accessorBuilder.setMethod(getStoreMethod(m, responseParams)); String requestTokenUrl = arguments.getRequestOption(OAuthArguments.REQUEST_TOKEN_URL_PARAM); verifyUrl(requestTokenUrl, responseParams); String accessTokenUrl = arguments.getRequestOption(OAuthArguments.ACCESS_TOKEN_URL_PARAM); verifyUrl(accessTokenUrl, responseParams); String authorizationUrl = arguments.getRequestOption(OAuthArguments.AUTHORIZATION_URL_PARAM); verifyUrl(authorizationUrl, responseParams); return new OAuthServiceProvider(requestTokenUrl, authorizationUrl, accessTokenUrl); } catch (SpecParserException e) { // these exceptions have decent programmer readable messages throw new OAuthRequestException(OAuthError.BAD_OAUTH_CONFIGURATION, e.getMessage()); } }