<div dir="ltr">I'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'm trying to access is the product-portal application from the unconfigured demo, I followed the tutorials and got it running, so here'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't be right, but I don't really know where my mistake is. I apologize for the inconvenience, but if it'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"><<a href="mailto:rodrigopsasaki@gmail.com" target="_blank">rodrigopsasaki@gmail.com</a>></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'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's what you meant right?</div>
<div><br></div><div>Nonetheless I'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"><<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>></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>
> Hello everyone,<br>
><br>
> Fist of all I apologize if I do anything that isn't normal, this is the<br>
> 1st time I subscribe to a mailing list, please let me know if I should<br>
> have done anything differently.<br>
><br>
> Alright then, my question is this: Is there a way for me to get a token<br>
> providing only user and password? Let me try and clarify it better.<br>
><br>
> We are using a homegrown solution based on SkeletonKey and we have a<br>
> flow where we use an URL that requires username and password and returns<br>
> directly an Access Token, with no Access Codes envolved. We use this so<br>
> that our own mobile apps can get access to our REST services.<br>
><br>
> Is there any way I could get around this with Keycloak? Getting an<br>
> access token directly to my mobile app?<br>
><br>
><br>
</div></div>> _______________________________________________<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>
><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>