[keycloak-dev] Checking whether a client has offline access enabled

Stian Thorgersen sthorger at redhat.com
Tue Nov 19 05:32:12 EST 2019


Looks like you want "new
UserSessionManager(session).findClientsWithOfflineToken(realm, user);". See
the old form based account for more details:
https://github.com/keycloak/keycloak/blob/master/services/src/main/java/org/keycloak/forms/account/freemarker/model/ApplicationsBean.java

On Mon, 18 Nov 2019 at 21:26, Douglas Palmer <dpalmer at redhat.com> wrote:

> Hi everyone
>
> I need to check whether a client has offline access enabled for the
> application page of the new account console. Is the correct way to do this
> to check if the client has the offline role? i.e.
> client.getRole(Constants.OFFLINE_ACCESS_ROLE) != null
>
> Regards
> Doug
>
>
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev
>
>


More information about the keycloak-dev mailing list