[keycloak-user] how keycloak.json file is loaded by the js ?
Stian Thorgersen
sthorger at redhat.com
Mon Mar 7 01:35:46 EST 2016
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).
On 4 March 2016 at 18:49, Charles Moulliard <cmoulliard at redhat.com> wrote:
> And the java client adapter uses these values
>
> /**
> * Configuration for Java based adapters
> *
> * @author <a href="mailto:bill at burkecentral.com" <bill at burkecentral.com>>Bill
> Burke</a>
> * @version $Revision: 1 $
> */
> @JsonPropertyOrder({"realm", "realm-public-key", "auth-server-url",
> "ssl-required",
> "resource", "public-client", "credentials",
> "use-resource-role-mappings",
> "enable-cors", "cors-max-age", "cors-allowed-methods",
> "expose-token", "bearer-only",
> "connection-pool-size",
> "allow-any-hostname", "disable-trust-manager", "truststore",
> "truststore-password",
> "client-keystore", "client-keystore-password",
> "client-key-password",
> "auth-server-url-for-backend-requests", "always-refresh-token",
> "register-node-at-startup", "register-node-period", "token-store",
> "principal-attribute"
> })
>
>
> On 04/03/16 18:39, Charles Moulliard wrote:
>
> So only these fields are required for the keycloak.js client ?
>
> kc.authServerUrl = config['auth-server-url'];
> kc.realm = config['realm'];
> kc.clientId = config['resource'];
> kc.clientSecret = (config['credentials'] ||
> {})['secret'];
>
> My confusion comes from that chapter which refers to the adapter config
> doc (
> http://keycloak.github.io/docs/userguide/keycloak-server/html/ch08.html#adapter-config).
> As js is also an adapter, I was thinking that all these values were also
> used by js client ;-)
>
>
> On 04/03/16 18:18, Sebastien Blanc wrote:
>
> No CORS stuff needed as the keycloak.json will always be on the same
> domain as the app, it happens here
> <https://github.com/keycloak/keycloak-js-bower/blob/master/dist/keycloak.js#L523>
> https://github.com/keycloak/keycloak-js-bower/blob/master/dist/keycloak.js#L523
>
> On Fri, Mar 4, 2016 at 6:12 PM, Charles Moulliard <
> <cmoulliard at redhat.com>cmoulliard at redhat.com> wrote:
>
>> Hi,
>>
>> How is the keycloak.json file loaded by the keycloak.js script as I
>> don't see any value like this "cors-allowed-methods" within the
>> keycloak.js file ?
>>
>> Regards,
>>
>> Charles
>> _______________________________________________
>> keycloak-user mailing list
>> keycloak-user at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>>
>
>
>
>
> _______________________________________________
> keycloak-user mailing listkeycloak-user at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/keycloak-user
>
>
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160307/0b3b4257/attachment.html
More information about the keycloak-user
mailing list