Spring Oauth2 ResourceOwnerPassword flow for Single Sign on
<p>I have an oauth Authserver app,a web app(enabled oauth sso),an android app(needs to access rest resources in the web app)</p>

<p>I am trying to implement spring-oauth2 taking example of oauth-vanilla(latest one with no jwt) spring boot sample project.The project has the following client configuration</p>

<pre><code>security.oauth2.client.clientId: acme
security.oauth2.client.clientSecret: acmesecret
security.oauth2.client.authorized-grant-types: authorization_code,refresh_token,password
security.oauth2.client.scope: openid
</code></pre>

<p>so the logic flow goes like(correct me if am wrong) user attempts access to the ui app -->zuul proxied redirect(with client details) to authentication server-->login with credentials (protected /authorize url)-->authorize the scopes-->return with the token/authorization code.</p>

<p>How to eliminate the user authorization step(for android app purpose i want resource owner apporach).I changed my client configuration like this to follow </p>

<pre><code>clients.inMemory().withClient("****").secret("*****").authorities("ROLE_USER")
                .authorizedGrantTypes("password", "refresh_token").scopes("read", "write");
</code></pre>

<p>but I am getting error from authserver app (<strong>DefaultRedirectResolver.java</strong>)</p>

<blockquote>
  <p>"A redirect_uri can only be used by implicit or authorization_code
  grant types."</p>
</blockquote>

<p>if i have my security.oauth properties a below in my web-ui app</p>

<pre><code>security:
  oauth2:    
    client:
      accessTokenUri: http://localhost:9097/uaa/oauth/token
      userAuthorizationUri: http://localhost:9097/uaa/oauth/authorize
      clientId: ****
      clientSecret: ****
    resource:
      userInfoUri: http://localhost:9097/uaa/user
</code></pre>

<p>for single sign on ,can resource owner password approach be used or not ? if so what should i change as part of configuration?</p>