I am new to Spring Boot OAuth2 framework. I have the following working when authenticating incoming requests to ask for token. The "withClient" and "secret" are both hard-coded and I want that to query against database like MySQL. I like different clients to have different login/secret pairs.
Is this possible? Can someone provide example? thanks
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
clients.inMemory()
.withClient("clientA")
.secret("secret")
.accessTokenValiditySeconds(2000) // expire time for access token
.refreshTokenValiditySeconds(-1) // expire time for refresh token
.scopes("read", "write") // scope related to resource server
.authorizedGrantTypes("password");
}