-
Notifications
You must be signed in to change notification settings - Fork 4k
Failure when defining a custom ClientDetailsService in AuthorizationServerConfigurerAdapter #336
Comments
Can't you just
(which begs the question why we need |
No sorry, but that does not work, please also have a look at the comments in https://jira.spring.io/browse/SECOAUTH-451 although not tested yet, I think you change now made it even more impossible. |
I saw the comments, but there isn't enough detail. Can you create a minimal test project with 2.0.5 and show what actually goes wrong? |
I tried the solution provided by @dsyer and it worked just fine. |
org.springframework.security.oauth2.config.annotation.configuration.ClientDetailsServiceConfiguration#clientDetailsService . it creates a bean with name "clientDetailsService ". And I custom my ClientDetailsService, and I use @Autowired private ClientDetailsService clientDetailsService to inject to AuthorizationServerConfigurerAdapter. I found that it inject ClientDetailsServiceConfiguration#clientDetailsService Bean instead of my custom clientDetailsService .so I have to use @qualifier("clientDetailsServiceImpl") to inject my custom clientDetailsService. @dsyer Can you improve it? for example,to change ClientDetailsServiceConfiguration#clientDetailsService bean default name "clientDetailsService". |
The clients-solution works, just do not Inject into your code classes like |
This is a copy of https://jira.spring.io/browse/SECOAUTH-451
While configuring a AuthorizationServer with
@EnableAuthorizationServer
andAuthorizationServerConfigurerAdapter
I have the need to define a custom implementation of aClientDetailsService
which I tried like this:although this seems work in the first place, one still also has to override:
if not, the the following error will be thrown.
This makes it impossible to define a custom implementation of a
ClientDetailsService
.The text was updated successfully, but these errors were encountered: