Skip to content

Keycloak: Different context root #995

Open

Description

@virtualmarc

By default Keycloak is deployed at a context root /auth which can be changed in the configuration.
Out Keycloak Server is deployed in the context root / which makes scribejava generate wrong URL's.

The problem is in

return baseUrl + (baseUrl.endsWith("/") ? "" : "/") + "auth/realms/" + realm;

where auth/ is hardcoded.

In other Clients/Keycloak Lib's the context root has to be set in the url.

Activity

  1. danielFesenmeyer commented on Jun 9, 2022

    @danielFesenmeyer

    Stumpled across the same issue. The "auth/" should just be removed - it still can be passed as part of the baseUrl, when it is needed.

  2. jocko-angi commented on Mar 7, 2023

    @jocko-angi

    Hopefully I'm bumping this. The PR is ready, our org could use this fix.

  3. dawnstrider commented on Oct 10, 2023

    @dawnstrider

    Was experimenting with this lib today and had the exact same issue. Please remove the hardcoded "auth/" prefix from the baseurl-composition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions