title: ResourceOwnerPasswordResourceDetails with Oauth2RestTemplate, setting username and password
body: <p>I am currently at the point where I configure my Oauth2RestTemplate with my controller. The said controller would recieve the user's username and password to be set in the ResourceOwnerPasswordResourceDetails however, I am not seeing how this is set. This application is for an Oauth2 client setup.  </p>
  
  <pre><code> //An extention of ResourceOwnerPasswordResourceDetails that adds a property 'token'.
  
   &lt;bean id="cPassword" class="com.cointraders.site.overrides.TokenOauthResourceDetails"&gt;
       &lt;property name="grantType" value="c_password"&gt;&lt;/property&gt;
       &lt;property name="clientAuthenticationScheme" value="header"&gt;&lt;/property&gt;
       &lt;property name="clientId" value="cointraders"&gt;&lt;/property&gt;
       &lt;property name="clientSecret" value="p@ssw0rd"&gt;&lt;/property&gt;
       &lt;property name="accessTokenUri" value="${oauth.accessTokenUri}"&gt;&lt;/property&gt;
   &lt;/bean&gt;  
  
   //My controller using the 'cPassword' bean above
  
   &lt;bean id="loginController" class="com.cointraders.site.controllers.LoginController"&gt;
      &lt;property name="checkCredentialRest"&gt;
          &lt;oauth:rest-template resource="cPassword"&gt;
          &lt;/oauth:rest-template&gt;
      &lt;/property&gt;
   &lt;/bean&gt;
  
  //My Controller
  
  @RequestMapping(value="/login")
  public class LoginController {
  
       private OAuth2RestTemplate checkCredentialRest;
  
       private OAuth2RestTemplate loginCredentialRest;
  
       public void setCheckCredentialRest(OAuth2RestTemplate checkCredentialRest) {
               this.checkCredentialRest = checkCredentialRest;
       }
  
       public void setLoginCredentialRest(OAuth2RestTemplate loginCredentialRest) {
               this.loginCredentialRest = loginCredentialRest;
       }
  
       @RequestMapping(method=RequestMethod.POST)
       @ResponseStatus(value=HttpStatus.OK)
       public void verifyCredential(@RequestBody LoginCredential creds)
       {
  
       }
   }
  </code></pre>
  
  <p>As can see, from my 'verifyCredential' I am passing the credentials mapped to a datamapper LoginCredential. This class has properties for 'username', 'password' and 'token' for the user. At this point, I was thiking it would be easy to pass the LoginCredential's object properties to the OAuth2RestTemplate loginCredentialRest but, that is not the case. </p>
  
  <p>Also I have configured the ResourceOwnerPasswordResourceDetails with the access token endpoint (accessTokenUri) and basically wired this object into the Oauth2RestTemplate. How would I use it to make a request to the access token endpoint supplying the "username", "password" and "token" for an Access Token?</p>