<div dir="ltr">I&#39;m sorry but I believe I may have misunderstood you somehow, I tried building a request for that URL to test it. <div><br></div><div>The application I&#39;m trying to access is the product-portal application from the unconfigured demo, I followed the tutorials and got it running, so here&#39;s the post I created:</div>
<div><br></div><div>POST <a href="http://localhost:8080/auth/rest/realms/demo/tokens/grants/access">http://localhost:8080/auth/rest/realms/demo/tokens/grants/access</a></div><div>Authorization: Basic cHJvZHVjdC1wb3J0YWw6MWQ5MDRlYzAtNjViMS00MDljLTljYTUtMDhkMGI1ODI0Y2I4</div>
<div>Content-Type: application/x-www-form-urlencoded</div><div><br></div><div>Form Data:</div><div>username: product-portal</div><div>password: key generated by keycloak</div><div><br></div><div><br></div><div>Here the Authorization header was also built on the name product-portal and the key that keycloak generated, so I entered it twice, and I know that can&#39;t be right, but I don&#39;t really know where my mistake is. I apologize for the inconvenience, but if it&#39;s not much trouble, could you clarify that for me? </div>
<div> </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 9, 2014 at 5:50 PM, Rodrigo Sasaki <span dir="ltr">&lt;<a href="mailto:rodrigopsasaki@gmail.com" target="_blank">rodrigopsasaki@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I considered that aswell.<div><br></div><div>The thing is the mobile app is already completed, and I&#39;m not in the position to make such design calls.</div>
<div><br></div><div>My idea was to create a normal Application, and use the URLs I define there instead of just giving the token to the mobile app, that&#39;s what you meant right?</div>
<div><br></div><div>Nonetheless I&#39;ll definitely pass on your suggestion up, it definitely sounds better and cleaner. Thank you for such a quick response!</div></div><div class="gmail_extra"><div><div class="h5"><br><br>
<div class="gmail_quote">
On Fri, May 9, 2014 at 5:46 PM, Bill Burke <span dir="ltr">&lt;<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

You can do a Basic Auth request<br>
<br>
POST /content-root/realms/{realm}/tokens/grants/access<br>
Authorization: Basic auth with client_id and secret<br>
Content-Type: application/x-www-form-urlencoded<br>
<br>
client_id is the id of your register application.<br>
<br>
form parameters are:<br>
<br>
username<br>
password<br>
<br>
<br>
BTW, for mobile, IMO, you are better off doing oauth with the mobile<br>
client and doing a mobile redirect to your browser and back.  That way<br>
Keycloak can manage your accounts.<br>
<div><div><br>
<br>
<br>
<br>
On 5/9/2014 4:35 PM, Rodrigo Sasaki wrote:<br>
&gt; Hello everyone,<br>
&gt;<br>
&gt; Fist of all I apologize if I do anything that isn&#39;t normal, this is the<br>
&gt; 1st time I subscribe to a mailing list, please let me know if I should<br>
&gt; have done anything differently.<br>
&gt;<br>
&gt; Alright then, my question is this: Is there a way for me to get a token<br>
&gt; providing only user and password? Let me try and clarify it better.<br>
&gt;<br>
&gt; We are using a homegrown solution based on SkeletonKey and we have a<br>
&gt; flow where we use an URL that requires username and password and returns<br>
&gt; directly an Access Token, with no Access Codes envolved. We use this so<br>
&gt; that our own mobile apps can get access to our REST services.<br>
&gt;<br>
&gt; Is there any way I could get around this with Keycloak? Getting an<br>
&gt; access token directly to my mobile app?<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; keycloak-user mailing list<br>
&gt; <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
&gt;<br>
<span><font color="#888888"><br>
--<br>
Bill Burke<br>
JBoss, a division of Red Hat<br>
<a href="http://bill.burkecentral.com" target="_blank">http://bill.burkecentral.com</a><br>
_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div dir="ltr"><font face="Times New Roman">Rodrigo Sasaki</font><div></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><font face="Times New Roman">Rodrigo Sasaki</font><div></div></div>
</div>