[keycloak-dev] Non blocking KeycloakInstalled loginDesktop() and logout()

Dimitry Polivaev dpolivaev at gmx.de
Sun Jun 23 07:11:28 EDT 2019


Hello folks,

currently there are only blocking variants of loginDesktop() and logout() at KeycloakInstalled.
It means that if the methods are called they open an URL in browser and wait until they get callback from the Keycloak server.

It makes not advisable to call them from the UI thread because they block it.

But even if the methods are called from a worker thread so that the application is not blocked, they always open a server socket and start threads and there is no way to close the socket and to kill the associated callback threads from the application code.

I would like to contribute non blocking versions which return CompletableFuture<Void>. If the user cancels the returned CompletableFuture, also the opened server socket should be closed.

See https://issues.jboss.org/browse/KEYCLOAK-10700

Any objections or opinions?

Cheers,
Dimitry


More information about the keycloak-dev mailing list