title: Could not fetch user details: class org.springframework.web.client.RestClientException, Could not extract response: no suitable
body: <p>iam getting this error message when build simple app </p>
  
  <p>Getting user info from: <a href="http://localhost:9999/uaa/user" rel="nofollow noreferrer">http://localhost:9999/uaa/user</a>
    Could not fetch user details: class org.springframework.web.client.RestClientException, Could not extract response: no suitable HttpMessageConverter found for response type [interface java.util.Map] and content type [text/html;charset=UTF-8]</p>
  
  <p>however i sure the content type is json</p>
  
  <p>this is the github repository <a href="https://github.com/ashraf-revo/oauth" rel="nofollow noreferrer">https://github.com/ashraf-revo/oauth</a></p>
  
  <p>this is server</p>
  
  <pre><code>@SpringBootApplication
  public class AuthServerApplication {
  
  public static void main(String[] args) {
      SpringApplication.run(AuthServerApplication.class, args);
  }
  }
  
  @Order(1)
  @Configuration
  @EnableWebSecurity
  class SecurityConfig extends WebSecurityConfigurerAdapter {
  @Override
  protected void configure(AuthenticationManagerBuilder auth) throws     Exception {
        auth.inMemoryAuthentication().withUser("ashraf").password("ashraf").roles("user");
  }
  
  @Override
  protected void configure(HttpSecurity http) throws Exception {
      http.authorizeRequests().antMatchers("/user").authenticated().and().formLogin();
  }
  
  @Bean
  @Override
  public AuthenticationManager authenticationManagerBean() throws Exception {
      return super.authenticationManagerBean();
  }
  }
  
  @Configuration
  class OAuth2ServerConfig {
  private static final String RESOURCE_IDS = "revo";
  
  @Configuration
  @EnableResourceServer
  protected static class ResourceServerConfiguration extends ResourceServerConfigurerAdapter {
      @Override
      public void configure(ResourceServerSecurityConfigurer resources) throws Exception {
          resources.resourceId(RESOURCE_IDS);
      }
  
      @Override
      public void configure(HttpSecurity http) throws Exception {
  
          http.authorizeRequests().antMatchers("/user").authenticated();
      }
  }
  
  @Configuration
  @EnableAuthorizationServer
  protected static class AuthorizationServerConfiguration extends AuthorizationServerConfigurerAdapter {
      @Autowired
      TokenStore tokenStore;
  
      @Autowired
      private AuthenticationManager authenticationManager;
  
      @Override
      public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
          clients.inMemory().withClient("revo")
                  .resourceIds(RESOURCE_IDS)
                  .authorizedGrantTypes("authorization_code", "implicit")
                  .authorities("ROLE_CLIENT")
                  .scopes("read", "write")
                  .secret("revo");
      }
  
      @Bean
      public TokenStore tokenStore() {
          return new InMemoryTokenStore();
      }
  
      @Override
      public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
          endpoints.tokenStore(tokenStore)
                  .authenticationManager(authenticationManager);
      }
  }
  
  }
  </code></pre>
  
  <p>this is the client</p>
  
  <pre><code>@SpringBootApplication
  public class ClientApplication {
  
  public static void main(String[] args) {
      SpringApplication.run(ClientApplication.class, args);
  }
  }
  
  @Configuration
  @EnableOAuth2Sso
  class SecurityConfigurer extends WebSecurityConfigurerAdapter {
  @Override
  protected void configure(HttpSecurity http) throws Exception {
      http.authorizeRequests().mvcMatchers("/home").authenticated();
  }
  }
  
   @Configuration
   class MvcConfigurer extends WebMvcConfigurerAdapter {
  @Override
  public void addViewControllers(ViewControllerRegistry registry) {
      registry.addViewController("/").setViewName("index");
      registry.addViewController("/home").setViewName("home");
  }
  }
  </code></pre>