[keycloak-user] Keycloak admin client API connection timeout
Gabriel Lavoie
glavoie at gmail.com
Mon Dec 12 09:29:52 EST 2016
Haim,
have a look at KeycloakBuilder. It can be used to create a Keycloak
instance with a custom ResteasyClient.
Gabriel
2016-12-12 4:57 GMT-05:00 Haim Vana <haimv at perfectomobile.com>:
> That's the problem - the rest easy client is not exposed in the admin
> client I can't get it.
>
>
> -----Original Message-----
> From: keycloak-user-bounces at lists.jboss.org [mailto:keycloak-user-bounces@
> lists.jboss.org] On Behalf Of Bill Burke
> Sent: Sunday, December 11, 2016 6:25 PM
> To: keycloak-user at lists.jboss.org
> Subject: Re: [keycloak-user] Keycloak admin client API connection timeout
>
> Read the resteasy docs. You can set the timeout in ResteasyClient. I
> forget how.
>
>
> On 12/11/16 10:33 AM, Haim Vana wrote:
> > Hi,
> >
> > We are using keycloak admin client API for various user management
> operations - most are create and update user and password.
> >
> > In the Keycloak getInstance method we can't specify the connection pool
> size or timeout - see below, can you please advise what is the connection
> default timeout ?
> >
> > And is there any way to change it (pool size or timeout) ?
> >
> >
> >
> > public static Keycloak getInstance(String serverUrl, String realm,
> String username, String password, String clientId) {
> > return new Keycloak(serverUrl, realm, username, password, clientId,
> (String)null, "password", (ResteasyClient)null);
> > }
> >
> >
> > Keycloak(String serverUrl, String realm, String username, String
> password, String clientId, String clientSecret, String grantType,
> ResteasyClient resteasyClient) {
> > this.config = new Config(serverUrl, realm, username, password,
> clientId, clientSecret, grantType);
> > this.client = resteasyClient != null?resteasyClient:(new
> ResteasyClientBuilder()).connectionPoolSize(10).build();
> > this.tokenManager = new TokenManager(this.config, this.client);
> > this.target = this.client.target(this.config.getServerUrl());
> > this.target.register(new BearerAuthFilter(this.tokenManager));
> > }
> >
> >
> >
> > Thanks,
> > Haim.
> >
> > The information contained in this message is proprietary to the sender,
> protected from disclosure, and may be privileged. The information is
> intended to be conveyed only to the designated recipient(s) of the message.
> If the reader of this message is not the intended recipient, you are hereby
> notified that any dissemination, use, distribution or copying of this
> communication is strictly prohibited and may be unlawful. If you have
> received this communication in error, please notify us immediately by
> replying to the message and deleting it from your computer. Thank you.
> > _______________________________________________
> > keycloak-user mailing list
> > keycloak-user at lists.jboss.org
> > https://emea01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Flists.jboss.org%2Fmailman%2Flistinfo%
> 2Fkeycloak-user&data=01%7C01%7Chaimv%40perfectomobile.com%
> 7C3c6d0c74cc254992112008d421e26a07%7Cceb4c662d6994e7da0bd272619a4
> 6977%7C1&sdata=rcVfAcyVcR2Pz7pw2IboPdmuHh7Pbm1kFixzmni2%2BAc%3D&reserved=0
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://emea01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Flists.jboss.org%2Fmailman%2Flistinfo%
> 2Fkeycloak-user&data=01%7C01%7Chaimv%40perfectomobile.com%
> 7C3c6d0c74cc254992112008d421e26a07%7Cceb4c662d6994e7da0bd272619a4
> 6977%7C1&sdata=rcVfAcyVcR2Pz7pw2IboPdmuHh7Pbm1kFixzmni2%2BAc%3D&reserved=0
> The information contained in this message is proprietary to the sender,
> protected from disclosure, and may be privileged. The information is
> intended to be conveyed only to the designated recipient(s) of the message.
> If the reader of this message is not the intended recipient, you are hereby
> notified that any dissemination, use, distribution or copying of this
> communication is strictly prohibited and may be unlawful. If you have
> received this communication in error, please notify us immediately by
> replying to the message and deleting it from your computer. Thank you.
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
--
Gabriel Lavoie
glavoie at gmail.com
More information about the keycloak-user
mailing list