Package org.springframework.web.client

Examples of org.springframework.web.client.HttpClientErrorException


  }
 
  @Override
  public AccessGrant exchangeForAccess(String authorizationCode, String redirectUri, MultiValueMap<String, String> additionalParameters) {
    if (behavior == THROW_EXCEPTION) {
      throw new HttpClientErrorException(BAD_REQUEST);
    }
   
    return new AccessGrant("accessToken");
  }
View Full Code Here


 
  @Override
  public OAuthToken fetchRequestToken(String callbackUrl, MultiValueMap<String, String> additionalParameters) {
   
    if (behavior == THROW_EXCEPTION) {
      throw new HttpClientErrorException(BAD_REQUEST);
    }
   
    return new OAuthToken("requestToken", "requestTokenSecret");
  }
View Full Code Here

  }
 
  @Override
  public OAuthToken exchangeForAccessToken(AuthorizedRequestToken requestToken, MultiValueMap<String, String> additionalParameters) {
    if (behavior == THROW_EXCEPTION) {
      throw new HttpClientErrorException(BAD_REQUEST);
    }
    return new OAuthToken("accessToken", "accessTokenSecret");
  }
View Full Code Here

    mockMvc.perform(get("/connect/oauth2Provider").sessionAttr("social_addConnection_duplicate", new DuplicateConnectionException(null)))
      .andExpect(view().name("connect/oauth2ProviderConnect"))
      .andExpect(request().sessionAttribute("social_addConnection_duplicate", nullValue()))
      .andExpect(request().attribute("social_addConnection_duplicate", true));

    mockMvc.perform(get("/connect/oauth2Provider").sessionAttr("social_provider_error", new HttpClientErrorException(HttpStatus.INTERNAL_SERVER_ERROR)))
      .andExpect(view().name("connect/oauth2ProviderConnect"))
      .andExpect(request().sessionAttribute("social_provider_error", nullValue()))
      .andExpect(request().attribute("social_provider_error", true));
}
View Full Code Here

TOP

Related Classes of org.springframework.web.client.HttpClientErrorException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.