<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">After finish of OIDC authentication,
Keycloak will redirect to your application with the "code"
parameter. Keycloak will always do this, it doesn't matter if you
authenticated through SAML identity broker or username/password
form or any other method. Then you theoretically need to exchange
the code for access-token in backchannel request, however as long
as you use our adapters, you don't need to care about it as
adapter will do it for you.<br>
<br>
We have examples (using adapters) where you can also see how is
bearer access token retrieved and then used for additional REST
calls to REST endpoints secured by bearer token. See the demo
example and the "customer-portal" and "product-portal"
applications.<br>
<br>
Marek<br>
<br>
On 08/12/15 16:48, Ton Swieb wrote:<br>
</div>
<blockquote
cite="mid:CAJJ5CnTOAkzq2Miqz9x7uucWttzQT+uj7tzwMk2FfyFbM9Oveg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>Hi,<br>
<br>
</div>
How can I obtain a bearer token from keycloak without
using the direct access grant (<a moz-do-not-send="true"
href="http://keycloak.github.io/docs/userguide/keycloak-server/html/direct-access-grants.html">http://keycloak.github.io/docs/userguide/keycloak-server/html/direct-access-grants.html</a>).<br>
<br>
</div>
<div>I have configured a SAML Identity Broker in Keycloak
which handles the login for my realm. As a result I do not
have a username/password combination to POST it to:<br>
<br>
<code class="">/{keycloak-root}/realms/{realm-name}/protocol/openid-connect/toke</code>n<br>
</div>
<div><br>
</div>
<div>How would I obtain a bearer token in this situation?<br>
<br>
</div>
</div>
Kind regards,<br>
<br>
</div>
Ton<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
keycloak-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/keycloak-user">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></pre>
</blockquote>
<br>
</body>
</html>