<div dir="ltr">It's not clear from the documentation, but the general adapter config only applies to server-side adapters (WildFly, Tomcat, etc.). The JavaScript adapter only reads a subset of the properties (auth-server-url, realm, resource).</div><div class="gmail_extra"><br><div class="gmail_quote">On 4 March 2016 at 18:49, Charles Moulliard <span dir="ltr"><<a href="mailto:cmoulliard@redhat.com" target="_blank">cmoulliard@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
And the java client adapter uses these values <br>
<br>
/**<br>
* Configuration for Java based adapters<br>
*<br>
* @author <a href=<a href="mailto:bill@burkecentral.com" target="_blank">"mailto:bill@burkecentral.com"</a>>Bill
Burke</a><br>
* @version $Revision: 1 $<br>
*/<br>
@JsonPropertyOrder({"realm", "realm-public-key", "auth-server-url",
"ssl-required",<br>
"resource", "public-client", "credentials",<br>
"use-resource-role-mappings",<br>
"enable-cors", "cors-max-age", "cors-allowed-methods",<br>
"expose-token", "bearer-only",<br>
"connection-pool-size",<br>
"allow-any-hostname", "disable-trust-manager", "truststore",
"truststore-password",<br>
"client-keystore", "client-keystore-password",
"client-key-password",<br>
"auth-server-url-for-backend-requests",
"always-refresh-token",<br>
"register-node-at-startup", "register-node-period",
"token-store", "principal-attribute"<br>
})<div><div class="h5"><br>
<br>
On 04/03/16 18:39, Charles Moulliard wrote:<br>
<blockquote type="cite">
So only these fields are required for the keycloak.js client ?<br>
<br>
kc.authServerUrl =
config['auth-server-url'];<br>
kc.realm = config['realm'];<br>
kc.clientId = config['resource'];<br>
kc.clientSecret =
(config['credentials'] || {})['secret'];<br>
<br>
My confusion comes from that chapter which refers to the adapter
config doc (<a href="http://keycloak.github.io/docs/userguide/keycloak-server/html/ch08.html#adapter-config" target="_blank">http://keycloak.github.io/docs/userguide/keycloak-server/html/ch08.html#adapter-config</a>).
As js is also an adapter, I was thinking that all these values
were also used by js client ;-)<br>
<br>
<br>
On 04/03/16 18:18, Sebastien Blanc wrote:<br>
<blockquote type="cite">
<div dir="ltr">No CORS stuff needed as the keycloak.json will
always be on the same domain as the app, it happens here <a href="https://github.com/keycloak/keycloak-js-bower/blob/master/dist/keycloak.js#L523" target="_blank"></a><a href="https://github.com/keycloak/keycloak-js-bower/blob/master/dist/keycloak.js#L523" target="_blank">https://github.com/keycloak/keycloak-js-bower/blob/master/dist/keycloak.js#L523</a><br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Mar 4, 2016 at 6:12 PM,
Charles Moulliard <span dir="ltr"><<a href="mailto:cmoulliard@redhat.com" target="_blank"></a><a href="mailto:cmoulliard@redhat.com" target="_blank">cmoulliard@redhat.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
How is the keycloak.json file loaded by the keycloak.js
script as I<br>
don't see any value like this "cors-allowed-methods"
within the<br>
keycloak.js file ?<br>
<br>
Regards,<br>
<br>
Charles<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" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
keycloak-user mailing list
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></pre>
</blockquote>
<br>
</div></div></div>
<br>_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br></blockquote></div><br></div>