I know questions similar to this already exist on stackoverflow. When I went through them, it didn't solved the problem I'm looking for.
I've a spring-boot web service as Oaut2ClientManagement
, in which I've creating an API which will basically register a new client.
When new company is getting registered, the companyId
(it is predefined in some company_details
table, yes the company is added in list but not registered to access APIs) is sent so based on that I've to generate client-id
& client-secret
which I'll store in CLIENT_KEY_MANAGEMENT
table. Based on this I write a java code to generating accessToken
.
So my question here is how can I generate client-id & client-secret based on companyId
I've received in request ? I've went through this answer. But is there any pre-defined way in spring-boot oauth
which can do this job ? As next step is to generate access token based on it.
I also went through oAuth tutorial. But, in this the client-id
& client-secret
are stored in properties file not in Database/other source. Also seems like it's single pair.
It will be great if someone can guide me to achieve above scenario using spring-boot
.