Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added authenticator wrapper for esignet for 1.1.5.5 IDA #1016

Draft
wants to merge 6 commits into
base: 1.1.5.5
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions authentication/esignet-integration-impl/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.mosip.authentication</groupId>
<artifactId>authentication-parent</artifactId>
<version>1.1.5.5-P1-rc3</version>
</parent>

<artifactId>esignet-integration-impl</artifactId>
<name>esignet-integration-impl</name>
<description>e-Signet Integration Implementation Library</description>

<properties>
<java.version>11</java.version>
<kernel-biometrics-util>1.1.5</kernel-biometrics-util>
</properties>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.22</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>io.mosip.esignet</groupId>
<artifactId>esignet-integration-api</artifactId>
<version>1.0.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>io.mosip.kernel</groupId>
<artifactId>kernel-keymanager-service</artifactId>
<version>1.2.1-SNAPSHOT</version>
<scope>provided</scope>
<classifier>lib</classifier>
<exclusions>
<exclusion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.mosip.authentication</groupId>
<artifactId>authentication-common</artifactId>
<version>${authentication-common.version}</version>
</dependency>
<dependency>
<groupId>io.mosip.biometric.util</groupId>
<artifactId>biometrics-util</artifactId>
<version>${kernel-biometrics-util}</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package io.mosip.authentication.esignet.integration.dto;

import java.time.LocalDateTime;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
* The Class AuditRequestDto.
*
* @author Manoj SP
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AuditRequest {

private String eventId;
private String eventName;
private String eventType;
private LocalDateTime actionTimeStamp;
private String hostName;
private String hostIp;
private String applicationId;
private String applicationName;
private String sessionUserId;
private String sessionUserName;
private String id;
private String idType;
private String createdBy;
private String moduleName;
private String moduleId;
private String description;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package io.mosip.authentication.esignet.integration.dto;

import lombok.Data;

@Data
public class AuditResponse {

private boolean status;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package io.mosip.authentication.esignet.integration.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ClientIdSecretKeyRequest {

private String clientId;
private String secretKey;
private String appId;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package io.mosip.authentication.esignet.integration.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Error {

private String errorCode;
private String errorMessage;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package io.mosip.authentication.esignet.integration.dto;

import java.util.List;

import io.mosip.esignet.api.dto.KycSigningCertificateData;
import lombok.Data;

@Data
public class GetAllCertificatesResponse {

private List<KycSigningCertificateData> allCertificates;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package io.mosip.authentication.esignet.integration.dto;

import lombok.Data;

@Data
public class IdaError {

private String actionMessage;
private String errorCode;
private String errorMessage;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package io.mosip.authentication.esignet.integration.dto;

import java.util.List;
import java.util.Map;

import lombok.Data;

@Data
public class IdaKycAuthRequest {

private String id;
private String version;
private String individualId;
private String individualIdType;
private String transactionID;
private String requestTime;
private String specVersion;
private String thumbprint;
private String domainUri;
private String env;
private boolean consentObtained;
private String request;
private String requestHMAC;
private String requestSessionKey;
private Map<String, Object> metadata;
private List<String> allowedKycAttributes;

@Data
public static class AuthRequest {
private String otp;
private String staticPin;
private String timestamp;
private List<Biometric> biometrics;
private List<KeyBindedToken> keyBindedTokens;
}

@Data
public static class Biometric {
private String data;
private String hash;
private String sessionKey;
private String specVersion;
private String thumbprint;
}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package io.mosip.authentication.esignet.integration.dto;

import java.util.List;

import lombok.Data;

@Data
public class IdaKycExchangeRequest {

private String id;
private String version;
private String requestTime;
private String transactionID;
private String kycToken;
private List<String> consentObtained;
private List<String> locales;
private String respType;
private String individualId;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package io.mosip.authentication.esignet.integration.dto;

import lombok.Data;

@Data
public class IdaKycExchangeResponse {

private String encryptedKyc;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package io.mosip.authentication.esignet.integration.dto;

import lombok.Data;

@Data
public class IdaKycResponse {

/** The Variable to hold value of kyc Status */
private boolean kycStatus;

/** The Variable to hold value of auth Token */
private String authToken;

private String thumbprint;

/** The Variable to hold value of identity */
private String identity;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package io.mosip.authentication.esignet.integration.dto;

import lombok.Data;

@Data
public class IdaOtpResponse {
private String maskedEmail;
private String maskedMobile;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package io.mosip.authentication.esignet.integration.dto;

import java.util.List;

import lombok.Data;

@Data
public class IdaResponseWrapper<T> {

private String id;
private String version;
private String transactionID;
private String responseTime;
private T response;
private List<IdaError> errors;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package io.mosip.authentication.esignet.integration.dto;

import java.util.List;

import lombok.Data;

@Data
public class IdaSendOtpRequest {

private String id;
private String version;
private String individualId;
private String individualIdType;
private String transactionID;
private String requestTime;
private List<String> otpChannel;

}
Loading