Initial Okta Spring Boot Connection - Error: Could not extract response

Following:
Java Spring

On startup I receive a:

org.springframework.web.client.RestClientException: Could not extract response: no suitable HttpMessageConverter found for response type [class com.okta.spring.oauth.discovery.OidcDiscoveryMetadata] and content type [text/html;charset=utf-8]
	at org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:110)
	at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:655)
	at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:628)
	at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:303)
	at com.okta.spring.oauth.discovery.OidcDiscoveryClient.discover(OidcDiscoveryClient.java:49)
	at com.okta.spring.oauth.OktaPropertiesMappingEnvironmentPostProcessor.discoveryPropertiesSource(OktaPropertiesMappingEnvironmentPostProcessor.java:137)
	at com.okta.spring.oauth.OktaPropertiesMappingEnvironmentPostProcessor.postProcessEnvironment(OktaPropertiesMappingEnvironmentPostProcessor.java:95)

I currently can’t recall how to add a message converter and am working on it. Just thought the tutorial should have that information rather than say: “That’s it!”

What is the appropriate url for the issuer (okta.oauth2.issuer)?

Can you share your configuration of the Okta Spring Boot Library?

I think there might be something wrong with the issuer.

The library is making a request to the configuration endpoint:

https://{{your org}}.oktapreview.com/oauth2/default/.well-known/openid-configuration

If you visit that in your browser, it should return Content-Type: application/json;charset=UTF-8

This isn’t configurable or anything, so I have a feeling the HTML that is being returned is Okta’s error page, which might mean the issuer is incorrect in your configuration.

Thanks,
Tom

Thanks it looks like i had overridden the value I had put for my authorization server with the wrong value.

If you are ever looking for these values, you can find them from the console as well :slight_smile:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.