Fixing broker examples
This commit is contained in:
parent
5f0b3ae019
commit
839ce470c2
9 changed files with 11 additions and 14 deletions
|
@ -33,7 +33,7 @@ documentation.
|
|||
|
||||
Please take a look on [Facebook Developer Console](https://developers.facebook.com/apps/) for more details. Make sure to use the correct
|
||||
redirect URI to be used as URL on Facebook. The facebook will redirect to this URI after finish authentication. For this example, it's the URL
|
||||
[http://localhost:8080/auth/realms/facebook-identity-provider-realm/broker/facebook](http://localhost:8080/auth/realms/facebook-identity-provider-realm/broker/facebook) .
|
||||
[http://localhost:8080/auth/realms/facebook-identity-provider-realm/broker/facebook/endpoint](http://localhost:8080/auth/realms/facebook-identity-provider-realm/broker/facebook/endpoint) .
|
||||
You can also determine this redirect URI from Keycloak admin console (It's in Identity provider settings for Facebook provider).
|
||||
|
||||
Once you have a Facebook Application configured, you need to obtain both **App ID** and **App Secret** and update the
|
||||
|
|
|
@ -53,9 +53,8 @@
|
|||
],
|
||||
"identityProviders": [
|
||||
{
|
||||
"id" : "facebook",
|
||||
"alias" : "facebook",
|
||||
"providerId" : "facebook",
|
||||
"name" : "Facebook",
|
||||
"enabled": true,
|
||||
"updateProfileFirstLogin" : "true",
|
||||
"storeToken" : "true",
|
||||
|
|
|
@ -54,7 +54,7 @@ Once you have a Google Application configured, you need to obtain both **Client
|
|||
Please, update both *clientId* and *clientSecret* configuration options with the **Client ID** and **Client Secret**.
|
||||
|
||||
Make sure to use the correct redirect URI to be used as URL on Google. The Google will redirect to this URI after finish authentication. For this example, it's the URL
|
||||
[http://localhost:8080/auth/realms/google-identity-provider-realm/broker/google](http://localhost:8080/auth/realms/google-identity-provider-realm/broker/google) .
|
||||
[http://localhost:8080/auth/realms/google-identity-provider-realm/broker/google/endpoint](http://localhost:8080/auth/realms/google-identity-provider-realm/broker/google/endpoint) .
|
||||
You can also determine the redirect URI from Keycloak admin console (It's in Identity provider settings for Google provider).
|
||||
|
||||
Make sure you've set up the Keycloak Server
|
||||
|
|
|
@ -53,9 +53,8 @@
|
|||
],
|
||||
"identityProviders": [
|
||||
{
|
||||
"id" : "google",
|
||||
"alias" : "google",
|
||||
"providerId" : "google",
|
||||
"name" : "Google",
|
||||
"enabled": true,
|
||||
"updateProfileFirstLogin" : "true",
|
||||
"storeToken" : "true",
|
||||
|
|
|
@ -5,7 +5,7 @@ What is it?
|
|||
|
||||
This example demonstrates how to broker a SAML Identity Provider in KeyCloak. In this case, the SAML Identity Provider
|
||||
belongs to a different realm than the application and we want to trust users from one realm to authenticate and access the
|
||||
applications in aonther realm.
|
||||
applications in another realm.
|
||||
|
||||
There are two main realms in this example:
|
||||
|
||||
|
|
|
@ -47,9 +47,8 @@
|
|||
],
|
||||
"identityProviders": [
|
||||
{
|
||||
"id" : "saml-identity-provider",
|
||||
"alias" : "saml-identity-provider",
|
||||
"providerId" : "saml",
|
||||
"name" : "SAML v2 Identity Provider",
|
||||
"enabled": true,
|
||||
"updateProfileFirstLogin" : "true",
|
||||
"storeToken" : "true",
|
||||
|
|
|
@ -28,10 +28,11 @@
|
|||
},
|
||||
"applications": [
|
||||
{
|
||||
"name": "http://localhost:8080/auth/",
|
||||
"name": "http://localhost:8080/auth/realms/saml-broker-authentication-realm",
|
||||
"protocol": "saml",
|
||||
"enabled": true,
|
||||
"redirectUris": [
|
||||
"http://localhost:8080/auth/realms/saml-broker-authentication-realm/broker/saml-identity-provider"
|
||||
"http://localhost:8080/auth/realms/saml-broker-authentication-realm/broker/saml-identity-provider/endpoint"
|
||||
],
|
||||
"attributes": {
|
||||
"saml.assertion.signature": "true",
|
||||
|
|
|
@ -119,7 +119,7 @@ public class TwitterShowUserServlet extends HttpServlet {
|
|||
}
|
||||
|
||||
private String getIdentityProviderTokenUrl() {
|
||||
return this.authServer + "/realms/" + this.realmName + "/broker/" + this.identityProvider.getId() + "/token";
|
||||
return this.authServer + "/realms/" + this.realmName + "/broker/" + this.identityProvider.getAlias() + "/token";
|
||||
}
|
||||
|
||||
private void initKeyCloakClient(ServletConfig config) {
|
||||
|
|
|
@ -64,9 +64,8 @@
|
|||
],
|
||||
"identityProviders": [
|
||||
{
|
||||
"id" : "twitter",
|
||||
"alias" : "twitter",
|
||||
"providerId" : "twitter",
|
||||
"name" : "Twitter",
|
||||
"enabled": true,
|
||||
"updateProfileFirstLogin" : "true",
|
||||
"storeToken" : "true",
|
||||
|
|
Loading…
Reference in a new issue