Open chengchen168168 opened 7 years ago
I can see 7 times when call /oauth/token
.....
I checked source code, found:
TokenEndpoint.postAccessToken()
ClientDetails authenticatedClient = getClientDetailsService().loadClientByClientId(clientId);
TokenRequest tokenRequest = getOAuth2RequestFactory().createTokenRequest(parameters, authenticatedClient);
Line 1 is first time loadClientByClientId
, line 2 enter public TokenRequest createTokenRequest(Map<String, String> requestParameters, ClientDetails authenticatedClient)
of class DefaultOAuth2RequestFactory
, this method already has clientDetails that loaded just now, and then invoke extractScopes()
which inner has run loadClientByClientId()
again. Why?
Each validation client_credentials,can see four prints