Skip to content

Commit

Permalink
P4ADEV-1931 remove mypay and mypivot resouces
Browse files Browse the repository at this point in the history
  • Loading branch information
antocalo committed Jan 28, 2025
1 parent 2768f4a commit 8333e32
Show file tree
Hide file tree
Showing 17 changed files with 2 additions and 404 deletions.
4 changes: 0 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ dependencies {
implementation("io.micrometer:micrometer-registry-prometheus")
implementation("org.springframework.boot:spring-boot-starter-data-redis")
implementation("org.springframework.boot:spring-boot-starter-data-mongodb")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:$springDocOpenApiVersion")
implementation("org.codehaus.janino:janino:$janinoVersion")
Expand All @@ -61,9 +60,6 @@ dependencies {
implementation("io.jsonwebtoken:jjwt:$jjwtVersion")
implementation("org.bouncycastle:bcprov-jdk18on:$bouncycastleVersion")

// PostgreSQL
runtimeOnly("org.postgresql:postgresql")

compileOnly("org.projectlombok:lombok")
annotationProcessor("org.projectlombok:lombok")

Expand Down
12 changes: 0 additions & 12 deletions gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2=compileClasspath
com.fasterxml.jackson.module:jackson-module-parameter-names:2.18.2=compileClasspath
com.fasterxml.jackson:jackson-bom:2.18.2=compileClasspath
com.nimbusds:nimbus-jose-jwt:9.48=compileClasspath
com.zaxxer:HikariCP:5.1.0=compileClasspath
io.jsonwebtoken:jjwt-api:0.12.6=compileClasspath
io.jsonwebtoken:jjwt:0.12.6=compileClasspath
io.lettuce:lettuce-core:6.4.1.RELEASE=compileClasspath
Expand Down Expand Up @@ -55,22 +54,17 @@ io.swagger.core.v3:swagger-core-jakarta:2.2.25=compileClasspath
io.swagger.core.v3:swagger-models-jakarta:2.2.25=compileClasspath
jakarta.activation:jakarta.activation-api:2.1.3=compileClasspath
jakarta.annotation:jakarta.annotation-api:2.1.1=compileClasspath
jakarta.persistence:jakarta.persistence-api:3.1.0=compileClasspath
jakarta.transaction:jakarta.transaction-api:2.0.1=compileClasspath
jakarta.validation:jakarta.validation-api:3.0.2=compileClasspath
jakarta.xml.bind:jakarta.xml.bind-api:4.0.2=compileClasspath
org.antlr:antlr4-runtime:4.13.0=compileClasspath
org.apache.commons:commons-lang3:3.17.0=compileClasspath
org.apache.logging.log4j:log4j-api:2.24.3=compileClasspath
org.apache.logging.log4j:log4j-to-slf4j:2.24.3=compileClasspath
org.apache.tomcat.embed:tomcat-embed-core:10.1.34=compileClasspath
org.apache.tomcat.embed:tomcat-embed-el:10.1.34=compileClasspath
org.apache.tomcat.embed:tomcat-embed-websocket:10.1.34=compileClasspath
org.aspectj:aspectjweaver:1.9.22.1=compileClasspath
org.bouncycastle:bcprov-jdk18on:1.79=compileClasspath
org.codehaus.janino:commons-compiler:3.1.12=compileClasspath
org.codehaus.janino:janino:3.1.12=compileClasspath
org.hibernate.orm:hibernate-core:6.6.4.Final=compileClasspath
org.jspecify:jspecify:1.0.0=compileClasspath
org.mongodb:bson:5.2.1=compileClasspath
org.mongodb:mongodb-driver-core:5.2.1=compileClasspath
Expand All @@ -87,10 +81,8 @@ org.springframework.boot:spring-boot-actuator-autoconfigure:3.4.1=compileClasspa
org.springframework.boot:spring-boot-actuator:3.4.1=compileClasspath
org.springframework.boot:spring-boot-autoconfigure:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter-actuator:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter-data-jpa:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter-data-mongodb:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter-data-redis:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter-jdbc:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter-json:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter-logging:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter-security:3.4.1=compileClasspath
Expand All @@ -99,7 +91,6 @@ org.springframework.boot:spring-boot-starter-web:3.4.1=compileClasspath
org.springframework.boot:spring-boot-starter:3.4.1=compileClasspath
org.springframework.boot:spring-boot:3.4.1=compileClasspath
org.springframework.data:spring-data-commons:3.4.1=compileClasspath
org.springframework.data:spring-data-jpa:3.4.1=compileClasspath
org.springframework.data:spring-data-keyvalue:3.4.1=compileClasspath
org.springframework.data:spring-data-mongodb:4.4.1=compileClasspath
org.springframework.data:spring-data-redis:3.4.1=compileClasspath
Expand All @@ -108,15 +99,12 @@ org.springframework.security:spring-security-core:6.4.2=compileClasspath
org.springframework.security:spring-security-crypto:6.4.2=compileClasspath
org.springframework.security:spring-security-web:6.4.2=compileClasspath
org.springframework:spring-aop:6.2.1=compileClasspath
org.springframework:spring-aspects:6.2.1=compileClasspath
org.springframework:spring-beans:6.2.1=compileClasspath
org.springframework:spring-context-support:6.2.1=compileClasspath
org.springframework:spring-context:6.2.1=compileClasspath
org.springframework:spring-core:6.2.1=compileClasspath
org.springframework:spring-expression:6.2.1=compileClasspath
org.springframework:spring-jcl:6.2.1=compileClasspath
org.springframework:spring-jdbc:6.2.1=compileClasspath
org.springframework:spring-orm:6.2.1=compileClasspath
org.springframework:spring-oxm:6.2.1=compileClasspath
org.springframework:spring-tx:6.2.1=compileClasspath
org.springframework:spring-web:6.2.1=compileClasspath
Expand Down

This file was deleted.

30 changes: 0 additions & 30 deletions src/main/java/it/gov/pagopa/payhub/auth/mypay/model/MyPayUser.java

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import it.gov.pagopa.payhub.auth.service.user.retrieve.UserDTOMapper;
import it.gov.pagopa.payhub.dto.generated.*;
import it.gov.pagopa.payhub.dto.generated.UserInfo;
import jakarta.transaction.Transactional;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
Expand Down Expand Up @@ -75,7 +74,6 @@ public OperatorDTO getOrganizationOperator(String organizationIpaCode,
}

@Override
@Transactional
public void deleteOrganizationOperator(String organizationIpaCode, String mappedExternalUserId) {
operatorsRepository.deleteOrganizationOperator(organizationIpaCode, mappedExternalUserId);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package it.gov.pagopa.payhub.auth.service.user.registration;

import it.gov.pagopa.payhub.auth.model.User;
import it.gov.pagopa.payhub.auth.mypay.service.MyPayUsersService;
import it.gov.pagopa.payhub.auth.mypivot.service.MyPivotUsersService;
import it.gov.pagopa.payhub.auth.repository.UsersRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
Expand All @@ -14,29 +12,17 @@ public class UserRegistrationService {
private final ExternalUserIdObfuscatorService externalUserIdObfuscatorService;
private final FiscalCodeObfuscatorService fiscalCodeObfuscatorService;
private final UsersRepository usersRepository;
private final MyPayUsersService myPayUsersService;
private final MyPivotUsersService myPivotUsersService;

public UserRegistrationService(ExternalUserIdObfuscatorService externalUserIdObfuscatorService,
FiscalCodeObfuscatorService fiscalCodeObfuscatorService, UsersRepository usersRepository,
MyPayUsersService myPayUsersService, MyPivotUsersService myPivotUsersService) {
FiscalCodeObfuscatorService fiscalCodeObfuscatorService, UsersRepository usersRepository) {
this.externalUserIdObfuscatorService = externalUserIdObfuscatorService;
this.fiscalCodeObfuscatorService = fiscalCodeObfuscatorService;
this.usersRepository = usersRepository;
this.myPayUsersService = myPayUsersService;
this.myPivotUsersService = myPivotUsersService;
}

public User registerUser(String externalUserId, String fiscalCode, String iamIssuer, String firstName, String lastName){
User user = buildUser(externalUserId, fiscalCode, iamIssuer, firstName, lastName);
log.info("Registering user having mappedExternalUserId {}", user.getMappedExternalUserId());

myPayUsersService.registerMyPayUser(user.getMappedExternalUserId());
log.info("Registering user on MyPay having mappedExternalUserId {}", externalUserId);

myPivotUsersService.registerMyPivotUser(user.getMappedExternalUserId());
log.info("Registering user on MyPivot having mappedExternalUserId {}", externalUserId);

return usersRepository.registerUser(user);
}

Expand Down
Loading

0 comments on commit 8333e32

Please sign in to comment.