Create Client Details Bean

Hello,
I am using the okta-spring-boot-starter in a simple boot 2.1.8 application backed by an Okta authorisation service. I would like to create a RestController but need to use ClientCredentialsResourceDetails. Is there an easy way to do this using the starter e.g:

@Bean
@ConfigurationProperties(“okta.oauth2”)
protected ClientCredentialsResourceDetails oAuthDetails() {
return new ClientCredentialsResourceDetails();
}

I thought the starter may have a way of easily doing this rather than reading properties from the yml file. The details must already be used behind the scenes.

Regards

Hello beagle:

We have the following post that shows how to create a ClientCredentialsResourceDetails for Spring Boot 1.5.x.

https://developer.okta.com/blog/2018/04/02/client-creds-with-spring-boot

I’m not sure how to migrate it to use Spring Boot 2.x and the most recent version of our starter, but maybe it’s a start?