diff --git a/pom.xml b/pom.xml index 4b3ba31..61f93a1 100644 --- a/pom.xml +++ b/pom.xml @@ -56,7 +56,7 @@ 3.0.0 2.22.0 - 24.0.1 + 25.0.2 diff --git a/src/main/java/ru/playa/keycloak/modules/AbstractRussianOAuth2IdentityProvider.java b/src/main/java/ru/playa/keycloak/modules/AbstractRussianOAuth2IdentityProvider.java index 04613b5..84dd01a 100644 --- a/src/main/java/ru/playa/keycloak/modules/AbstractRussianOAuth2IdentityProvider.java +++ b/src/main/java/ru/playa/keycloak/modules/AbstractRussianOAuth2IdentityProvider.java @@ -146,7 +146,6 @@ public Response authResponse( } } - federatedIdentity.setIdpConfig(providerConfig); federatedIdentity.setIdp(provider); federatedIdentity.setAuthenticationSession(authSession); diff --git a/src/main/java/ru/playa/keycloak/modules/AbstractVKOAuth2IdentityProvider.java b/src/main/java/ru/playa/keycloak/modules/AbstractVKOAuth2IdentityProvider.java index cafbcfd..32cf5c0 100644 --- a/src/main/java/ru/playa/keycloak/modules/AbstractVKOAuth2IdentityProvider.java +++ b/src/main/java/ru/playa/keycloak/modules/AbstractVKOAuth2IdentityProvider.java @@ -91,14 +91,14 @@ protected BrokeredIdentityContext extractIdentityFromProfile(EventBuilder event, logger.infof("ExtractIdentityFromProfile. Context %s", context); BrokeredIdentityContext user = new BrokeredIdentityContext( - Objects.requireNonNull(JsonUtils.asText(context, "id")) + Objects.requireNonNull(JsonUtils.asText(context, "id")), + getConfig() ); user.setUsername(JsonUtils.asText(context, "screen_name")); user.setFirstName(JsonUtils.asText(context, "first_name")); user.setLastName(JsonUtils.asText(context, "last_name")); - user.setIdpConfig(getConfig()); user.setIdp(this); AbstractJsonUserAttributeMapper.storeUserProfileForMapper(user, context, getConfig().getAlias()); diff --git a/src/main/java/ru/playa/keycloak/modules/mailru/MailRuIdentityProvider.java b/src/main/java/ru/playa/keycloak/modules/mailru/MailRuIdentityProvider.java index 7746267..5acf5a0 100644 --- a/src/main/java/ru/playa/keycloak/modules/mailru/MailRuIdentityProvider.java +++ b/src/main/java/ru/playa/keycloak/modules/mailru/MailRuIdentityProvider.java @@ -92,7 +92,7 @@ protected SimpleHttp buildUserInfoRequest(String subjectToken, String userInfoUr protected BrokeredIdentityContext extractIdentityFromProfile(EventBuilder event, JsonNode profile) { logger.info("profile: " + profile.toString()); - BrokeredIdentityContext user = new BrokeredIdentityContext(getJsonProperty(profile, "email")); + BrokeredIdentityContext user = new BrokeredIdentityContext(getJsonProperty(profile, "email"), getConfig()); String email = getJsonProperty(profile, "email"); @@ -107,7 +107,6 @@ protected BrokeredIdentityContext extractIdentityFromProfile(EventBuilder event, user.setFirstName(getJsonProperty(profile, "first_name")); user.setLastName(getJsonProperty(profile, "last_name")); - user.setIdpConfig(getConfig()); user.setIdp(this); AbstractJsonUserAttributeMapper.storeUserProfileForMapper(user, profile, getConfig().getAlias()); diff --git a/src/main/java/ru/playa/keycloak/modules/ok/OKIdentityProvider.java b/src/main/java/ru/playa/keycloak/modules/ok/OKIdentityProvider.java index 87298ed..ec81a27 100644 --- a/src/main/java/ru/playa/keycloak/modules/ok/OKIdentityProvider.java +++ b/src/main/java/ru/playa/keycloak/modules/ok/OKIdentityProvider.java @@ -80,7 +80,7 @@ protected SimpleHttp buildUserInfoRequest(String subjectToken, String userInfoUr protected BrokeredIdentityContext extractIdentityFromProfile(EventBuilder event, JsonNode profile) { logger.info("profile: " + profile.toString()); - BrokeredIdentityContext user = new BrokeredIdentityContext(getJsonProperty(profile, "uid")); + BrokeredIdentityContext user = new BrokeredIdentityContext(getJsonProperty(profile, "uid"), getConfig()); String email = getJsonProperty(profile, "email"); if (getConfig().isEmailRequired() && StringUtils.isNullOrEmpty(email)) { @@ -103,7 +103,6 @@ protected BrokeredIdentityContext extractIdentityFromProfile(EventBuilder event, user.setFirstName(getJsonProperty(profile, "first_name")); user.setLastName(getJsonProperty(profile, "last_name")); - user.setIdpConfig(getConfig()); user.setIdp(this); AbstractJsonUserAttributeMapper.storeUserProfileForMapper(user, profile, getConfig().getAlias()); diff --git a/src/main/java/ru/playa/keycloak/modules/yandex/YandexIdentityProvider.java b/src/main/java/ru/playa/keycloak/modules/yandex/YandexIdentityProvider.java index ccbdf8b..b77687d 100644 --- a/src/main/java/ru/playa/keycloak/modules/yandex/YandexIdentityProvider.java +++ b/src/main/java/ru/playa/keycloak/modules/yandex/YandexIdentityProvider.java @@ -76,7 +76,7 @@ protected SimpleHttp buildUserInfoRequest(String subjectToken, String userInfoUr @Override protected BrokeredIdentityContext extractIdentityFromProfile(EventBuilder event, JsonNode node) { - BrokeredIdentityContext user = new BrokeredIdentityContext(getJsonProperty(node, "id")); + BrokeredIdentityContext user = new BrokeredIdentityContext(getJsonProperty(node, "id"), getConfig()); String email = getJsonProperty(node, "default_email"); if (StringUtils.isNullOrEmpty(email)) { @@ -96,7 +96,6 @@ protected BrokeredIdentityContext extractIdentityFromProfile(EventBuilder event, user.setLastName(getJsonProperty(node, "last_name")); user.setFirstName(getJsonProperty(node, "first_name")); - user.setIdpConfig(getConfig()); user.setIdp(this); AbstractJsonUserAttributeMapper.storeUserProfileForMapper(user, node, getConfig().getAlias());