Bladeren bron

kafka Persist

MaxKey 4 jaren geleden
bovenliggende
commit
618aba8b74

+ 0 - 2
maxkey-authentications/maxkey-authentication-core/build.gradle

@@ -9,8 +9,6 @@ dependencies {
 	compile project(":maxkey-common")
 	compile project(":maxkey-core")
 	compile project(":maxkey-persistence")
-   	compile project(":maxkey-protocols:maxkey-protocol-oauth-2.0")
-   	compile project(":maxkey-protocols:maxkey-protocol-saml-2.0")
    	compile project(":maxkey-authentications:maxkey-authentication-otp")
    
 }

+ 0 - 12
maxkey-identitys/maxkey-identity-kafka/build.gradle

@@ -1,12 +0,0 @@
-description = "maxkey-identity-kafka"
-
-apply plugin: 'java'
-
-dependencies {
-	//local jars
-	compile fileTree(dir: '../maxkey-lib/*/', include: '*.jar')
-	
-	compile project(":maxkey-common")
-	compile project(":maxkey-core")
-   
-}

+ 0 - 1
maxkey-persistence/build.gradle

@@ -6,5 +6,4 @@ dependencies {
     	
     compile project(":maxkey-common")
     compile project(":maxkey-core")
-    compile project(":maxkey-identitys:maxkey-identity-kafka")
 }

+ 1 - 1
maxkey-identitys/maxkey-identity-kafka/src/main/java/org/maxkey/identity/kafka/KafkaIdentityAction.java → maxkey-persistence/src/main/java/org/maxkey/persistence/kafka/KafkaIdentityAction.java

@@ -15,7 +15,7 @@
  */
  
 
-package org.maxkey.identity.kafka;
+package org.maxkey.persistence.kafka;
 
 public class KafkaIdentityAction {
     

+ 1 - 1
maxkey-identitys/maxkey-identity-kafka/src/main/java/org/maxkey/identity/kafka/KafkaIdentityTopic.java → maxkey-persistence/src/main/java/org/maxkey/persistence/kafka/KafkaIdentityTopic.java

@@ -15,7 +15,7 @@
  */
  
 
-package org.maxkey.identity.kafka;
+package org.maxkey.persistence.kafka;
 
 public class KafkaIdentityTopic {
     

+ 1 - 1
maxkey-identitys/maxkey-identity-kafka/src/main/java/org/maxkey/identity/kafka/KafkaMessage.java → maxkey-persistence/src/main/java/org/maxkey/persistence/kafka/KafkaMessage.java

@@ -15,7 +15,7 @@
  */
  
 
-package org.maxkey.identity.kafka;
+package org.maxkey.persistence.kafka;
 
 public class KafkaMessage {
 

+ 3 - 3
maxkey-identitys/maxkey-identity-kafka/src/main/java/org/maxkey/identity/kafka/KafkaProvisioningService.java → maxkey-persistence/src/main/java/org/maxkey/persistence/kafka/KafkaPersistService.java

@@ -15,7 +15,7 @@
  */
  
 
-package org.maxkey.identity.kafka;
+package org.maxkey.persistence.kafka;
 
 import java.util.UUID;
 
@@ -29,9 +29,9 @@ import org.springframework.kafka.core.KafkaTemplate;
 import org.springframework.stereotype.Component;
 
 @Component
-public class KafkaProvisioningService {
+public class KafkaPersistService {
     
-    private static final Logger _logger = LoggerFactory.getLogger(KafkaProvisioningService.class);
+    private static final Logger _logger = LoggerFactory.getLogger(KafkaPersistService.class);
     
     @Autowired
     protected ApplicationConfig applicationConfig;

+ 7 - 7
maxkey-persistence/src/main/java/org/maxkey/persistence/service/OrganizationsService.java

@@ -34,9 +34,9 @@ import org.apache.poi.ss.usermodel.Sheet;
 import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.maxkey.domain.Organizations;
-import org.maxkey.identity.kafka.KafkaIdentityAction;
-import org.maxkey.identity.kafka.KafkaIdentityTopic;
-import org.maxkey.identity.kafka.KafkaProvisioningService;
+import org.maxkey.persistence.kafka.KafkaIdentityAction;
+import org.maxkey.persistence.kafka.KafkaIdentityTopic;
+import org.maxkey.persistence.kafka.KafkaPersistService;
 import org.maxkey.persistence.mapper.OrganizationsMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -49,7 +49,7 @@ import com.google.common.collect.Lists;
 public class OrganizationsService  extends JpaBaseService<Organizations>{
 
     @Autowired
-    KafkaProvisioningService kafkaProvisioningService;
+    KafkaPersistService kafkaPersistService;
     
 	public OrganizationsService() {
 		super(OrganizationsMapper.class);
@@ -66,7 +66,7 @@ public class OrganizationsService  extends JpaBaseService<Organizations>{
 	
 	 public boolean insert(Organizations organization) {
 	     if(super.insert(organization)){
-             kafkaProvisioningService.send(
+	    	 kafkaPersistService.send(
                      KafkaIdentityTopic.ORG_TOPIC, organization, KafkaIdentityAction.CREATE_ACTION);
              return true;
          }
@@ -75,7 +75,7 @@ public class OrganizationsService  extends JpaBaseService<Organizations>{
 	 
 	 public boolean update(Organizations organization) {
 	     if(super.update(organization)){
-             kafkaProvisioningService.send(
+	    	 kafkaPersistService.send(
                      KafkaIdentityTopic.ORG_TOPIC, organization, KafkaIdentityAction.UPDATE_ACTION);
              return true;
          }
@@ -84,7 +84,7 @@ public class OrganizationsService  extends JpaBaseService<Organizations>{
  
 	 public boolean delete(Organizations organization) {
 	     if(super.delete(organization)){
-             kafkaProvisioningService.send(
+	    	 kafkaPersistService.send(
                      KafkaIdentityTopic.ORG_TOPIC, organization, KafkaIdentityAction.DELETE_ACTION);
              return true;
          }

+ 8 - 8
maxkey-persistence/src/main/java/org/maxkey/persistence/service/UserInfoService.java

@@ -40,10 +40,10 @@ import org.maxkey.crypto.ReciprocalUtils;
 import org.maxkey.crypto.password.PasswordReciprocal;
 import org.maxkey.domain.ChangePassword;
 import org.maxkey.domain.UserInfo;
-import org.maxkey.identity.kafka.KafkaIdentityAction;
-import org.maxkey.identity.kafka.KafkaIdentityTopic;
-import org.maxkey.identity.kafka.KafkaProvisioningService;
 import org.maxkey.persistence.db.PasswordPolicyValidator;
+import org.maxkey.persistence.kafka.KafkaIdentityAction;
+import org.maxkey.persistence.kafka.KafkaIdentityTopic;
+import org.maxkey.persistence.kafka.KafkaPersistService;
 import org.maxkey.persistence.mapper.UserInfoMapper;
 import org.maxkey.util.DateUtils;
 import org.maxkey.util.StringUtils;
@@ -76,7 +76,7 @@ public class UserInfoService extends JpaBaseService<UserInfo> {
 	PasswordPolicyValidator passwordPolicyValidator;
 	
 	@Autowired
-	KafkaProvisioningService kafkaProvisioningService;
+	KafkaPersistService kafkaPersistService;
 	
 	 @Autowired
 	 protected JdbcTemplate jdbcTemplate;
@@ -96,7 +96,7 @@ public class UserInfoService extends JpaBaseService<UserInfo> {
     public boolean insert(UserInfo userInfo) {
         userInfo = passwordEncoder(userInfo);
         if (super.insert(userInfo)) {
-            kafkaProvisioningService.send(
+        	kafkaPersistService.send(
                     KafkaIdentityTopic.USERINFO_TOPIC, 
                     userInfo,
                     KafkaIdentityAction.CREATE_ACTION);
@@ -109,7 +109,7 @@ public class UserInfoService extends JpaBaseService<UserInfo> {
     public boolean update(UserInfo userInfo) {
         userInfo = passwordEncoder(userInfo);
         if (super.update(userInfo)) {
-            kafkaProvisioningService.send(
+        	kafkaPersistService.send(
                     KafkaIdentityTopic.USERINFO_TOPIC, 
                     userInfo,
                     KafkaIdentityAction.UPDATE_ACTION);
@@ -122,7 +122,7 @@ public class UserInfoService extends JpaBaseService<UserInfo> {
 	
 	public boolean delete(UserInfo userInfo) {
 		if( super.delete(userInfo)){
-		    kafkaProvisioningService.send(
+			kafkaPersistService.send(
 		            KafkaIdentityTopic.USERINFO_TOPIC, 
 		            userInfo, 
 		            KafkaIdentityAction.DELETE_ACTION);
@@ -283,7 +283,7 @@ public class UserInfoService extends JpaBaseService<UserInfo> {
             changePassword.setUsername(userInfo.getUsername());
             changePassword.setDecipherable(userInfo.getDecipherable());
             changePassword.setPassword(userInfo.getPassword());
-            kafkaProvisioningService.send(
+            kafkaPersistService.send(
                     KafkaIdentityTopic.PASSWORD_TOPIC, 
                     changePassword, 
                     KafkaIdentityAction.PASSWORD_ACTION);

+ 0 - 1
maxkey-web-manage/build.gradle

@@ -69,7 +69,6 @@ dependencies {
    	compile project(":maxkey-protocols:maxkey-protocol-oauth-2.0")
    	compile project(":maxkey-protocols:maxkey-protocol-saml-2.0")   
    	compile project(":maxkey-identitys:maxkey-identity-scim")   
-   	compile project(":maxkey-identitys:maxkey-identity-kafka")	
    	compile project(":maxkey-identitys:maxkey-identity-rest")
    	
 }

+ 0 - 1
maxkey-web-maxkey/build.gradle

@@ -80,7 +80,6 @@ dependencies {
    	compile project(":maxkey-protocols:maxkey-protocol-oauth-2.0")
    	compile project(":maxkey-protocols:maxkey-protocol-saml-2.0")
 	compile project(":maxkey-protocols:maxkey-protocol-jwt")
-	compile project(":maxkey-identitys:maxkey-identity-kafka")
 	
 }
 /*

+ 0 - 1
settings.gradle

@@ -15,7 +15,6 @@ include 'maxkey-authentications:maxkey-authentication-otp'
 
 //identity
 include 'maxkey-identitys:maxkey-identity-scim'
-include 'maxkey-identitys:maxkey-identity-kafka'
 include 'maxkey-identitys:maxkey-identity-rest'
 
 //Protocol