title: Authentication is required to obtain an access token (anonymous not allowed)
body: <p>I try to modify existing example - <a href="https://github.com/spring-projects/spring-security-oauth/tree/master/samples" rel="noreferrer">Tonr2 and Sparklr2</a>.
  Also I viewed this tutorial based on Spring Boot <a href="https://spring.io/blog/2015/02/03/sso-with-oauth2-angular-js-and-spring-security-part-v" rel="noreferrer">Spring Boot OAuth2</a>. I try to build application like in Tonr2 example but without first login (on tonr2). I just need one Authentication on Sparklr2 side. I do this:</p>
  
  <pre><code>@Bean
      public OAuth2ProtectedResourceDetails sparklr() {
          AuthorizationCodeResourceDetails details = new AuthorizationCodeResourceDetails();
          details.setId("sparklr/tonr");
          details.setClientId("tonr");
          details.setTokenName("oauth_token");
          details.setClientSecret("secret");
          details.setAccessTokenUri(accessTokenUri);
          details.setUserAuthorizationUri(userAuthorizationUri);
          details.setScope(Arrays.asList("openid"));
          details.setGrantType("client_credentials");
          details.setAuthenticationScheme(AuthenticationScheme.none);
          details.setClientAuthenticationScheme(AuthenticationScheme.none);
          return details;
      }
  </code></pre>
  
  <p>But I have <code>Authentication is required to obtain an access token (anonymous not allowed)</code> . I checked <a href="http://Authentication%20is%20required%20to%20obtain%20an%20access%20token%20(anonymous%20not%20allowed)" rel="noreferrer">this question</a>. Of course, my user is anonymous - I want to login on Sparklr2. Also, I tried different combinations of settings of this bean, but nothing good. How to fix it? How to make it work as I want? </p>