I am working on Spring Security OAuth 2 based on Spark2 and tonr2. Now I have a question about this exception:

"Authentication is required to obtain an access token (anonymous not allowed)" on

org.springframework.security.oauth2.client.token.A ccessTokenProviderChain.obtainAccessToken(OAuth2Pr otectedResourceDetails, AccessTokenRequest)

Code:
		if (auth instanceof AnonymousAuthenticationToken) {
			if (!resource.isClientOnly()) {
                 throw new InsufficientAuthenticationException(
                 "Authentication is required to obtain an access token (anonymous not allowed)");
			}
		}
I was wondering why there was such a limitation, cause I just need to let users to login my site with an other website account....

Any answer will be appreciated.

Thnx.