FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[Issue#1068] KeycloakApi doesn't work with Keycloak version >= 17 by Julesfpollender · Pull Request #1069 · scribejava/scribejava · GitHub

Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .java  (2) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
      • KeycloakApi.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static KeycloakApi instance(String baseUrl, String realm) {
}

protected static String composeBaseUrlWithRealm(String baseUrl, String realm) {
return baseUrl + (baseUrl.endsWith("/") ? "" : "/") + "auth/realms/" + realm;
return baseUrl + (baseUrl.endsWith("/") ? "" : "/") + "realms/" + realm;
}

@Override
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ public static void main(String... args) throws IOException, InterruptedException
final String apiKey = "your_api_key";
final String apiSecret = "your_api_secret";
final String callback = "your_callback";
final String baseUrl = "your_base_url";
final String baseUrl = "your_base_url"; // Add /auth at the end when using keycloak version < 17
final String realm = "your_realm";

final String protectedResourceUrl = baseUrl + "/auth/realms/" + realm + "/protocol/openid-connect/userinfo";
final String protectedResourceUrl = baseUrl + "/realms/" + realm + "/protocol/openid-connect/userinfo";

final OAuth20Service service = new ServiceBuilder(apiKey)
.apiSecret(apiSecret)
Expand Down

Back | FazBrowse Home | New Git URL