Skip to content

Commit 3790097

Browse files
committed
[MOSIP-41056] Added compass-identity-plugin
Signed-off-by: pvsaidurga <[email protected]>
1 parent 897ce09 commit 3790097

21 files changed

+1280
-0
lines changed

compass-identity-plugin/README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# compass-identity-plugin
2+
3+
## About
4+
Implementation for all the interfaces defined in esignet-integration-api.
5+
6+
This library should be added as a runtime dependency to [esignet-service](https://github.com/mosip/esignet)
7+
8+
## Configurations required to be added / updated in esignet-default.properties
9+
10+
````
11+
## Compass plugin configuration
12+
13+
mosip.esignet.integration.scan-base-package=io.compass.esignet.plugin
14+
mosip.esignet.integration.authenticator=CompassAuthenticationService
15+
mosip.esignet.integration.key-binder=CompassKeyBindingWrapperService
16+
mosip.esignet.integration.vci-plugin=NoOpVCIssuancePlugin
17+
18+
19+
## Compass mock OTP configuration
20+
mosip.esignet.compass.authenticator.otp-value=111111
21+
22+
23+
## Update below cache related configuration with "kycauth" and "challengehash" cache name
24+
25+
mosip.esignet.cache.size={'clientdetails' : 200, 'preauth': 200, 'authenticated': 200, 'authcodegenerated': 200, 'userinfo': 200, \
26+
'linkcodegenerated' : 500, 'linked': 200 , 'linkedcode': 200, 'linkedauth' : 200 , 'consented' :200, 'vcissuance':100, \
27+
'apiRateLimit' : 500, 'blocked': 500,'kycauth': 500,'challengehash': 500 }
28+
29+
mosip.esignet.cache.expire-in-seconds={'clientdetails' : 86400, 'preauth': 180, 'authenticated': ${mosip.esignet.authentication-expire-in-secs}, \
30+
'authcodegenerated': 60, 'userinfo': ${mosip.esignet.access-token-expire-seconds}, 'linkcodegenerated' : ${mosip.esignet.link-code-expire-in-secs}, \
31+
'linked': 60 , 'linkedcode': ${mosip.esignet.link-code-expire-in-secs}, 'linkedauth' : ${mosip.esignet.authentication-expire-in-secs}, \
32+
'consented': 120, 'vcissuance': ${mosip.esignet.access-token-expire-seconds}, 'apiRateLimit' : 180, 'blocked': 300, 'kycauth':1800, ,'challengehash': 1800}
33+
34+
mosip.esignet.cache.names=clientdetails,preauth,authenticated,authcodegenerated,userinfo,linkcodegenerated,linked,linkedcode,\
35+
linkedauth,consented,vcissuance,apiRateLimit,blocked,kycauth,challenghash
36+
37+
## Compass identity endpoint configuration, update the API credentials based on the environment
38+
39+
40+
41+
````
42+
43+
## License
44+
This project is licensed under the terms of [Mozilla Public License 2.0](LICENSE).
45+
This integration plugin is compatible with [Sunbird-RC 1.0.0](https://github.com/Sunbird-RC/sunbird-rc-core/tree/v1.0.0)
46+
47+

compass-identity-plugin/pom.xml

Lines changed: 300 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,300 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
6+
<groupId>io.compass.esignet</groupId>
7+
<artifactId>compass-identity-plugin</artifactId>
8+
<version>0.0.1-SNAPSHOT</version>
9+
<packaging>jar</packaging>
10+
11+
<name>compass-identity-plugin</name>
12+
<description>Compass identity plugin to integrate with eSignet</description>
13+
<url>https://github.com/mosip/esignet-plugins</url>
14+
15+
<licenses>
16+
<license>
17+
<name>MPL 2.0</name>
18+
<url>https://www.mozilla.org/en-US/MPL/2.0/</url>
19+
</license>
20+
</licenses>
21+
<scm>
22+
<connection>scm:git:git://github.com/mosip/esignet-plugins.git</connection>
23+
<developerConnection>scm:git:ssh://github.com:mosip/esignet-plugins.git</developerConnection>
24+
<url>https://github.com/mosip/esignet-plugins</url>
25+
<tag>HEAD</tag>
26+
</scm>
27+
28+
<developers>
29+
<developer>
30+
<name>Mosip</name>
31+
<email>[email protected]</email>
32+
<organization>io.mosip</organization>
33+
<organizationUrl>https://github.com/mosip/esignet-plugins</organizationUrl>
34+
</developer>
35+
</developers>
36+
37+
<properties>
38+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
39+
<java.version>11</java.version>
40+
<maven.compiler.source>11</maven.compiler.source>
41+
<maven.compiler.target>11</maven.compiler.target>
42+
<maven-assembly-plugin.version>3.3.0</maven-assembly-plugin.version>
43+
<maven-compiler-plugin.version>2.4</maven-compiler-plugin.version>
44+
<maven-surefire-plugin.version>2.22.0</maven-surefire-plugin.version>
45+
<maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
46+
<maven-source-plugin>2.2.1</maven-source-plugin>
47+
<nexus-staging-maven-plugin>1.6.7</nexus-staging-maven-plugin>
48+
<git-commit-id-plugin.version>3.0.1</git-commit-id-plugin.version>
49+
<maven.jacoco.version>0.8.5</maven.jacoco.version>
50+
<maven-javadoc-plugin.version>3.3.1</maven-javadoc-plugin.version>
51+
<maven-shade-plugin.version>2.3</maven-shade-plugin.version>
52+
53+
<spring-cloud.version>Hoxton.SR8</spring-cloud.version>
54+
<spring.boot.version>2.3.6.RELEASE</spring.boot.version>
55+
56+
<kernel-keymanager-service.version>1.2.1.0</kernel-keymanager-service.version>
57+
<esignet.version>1.4.1</esignet.version>
58+
59+
<sonar.exclusions>**/dto/**,**/entity/**,**/exception/**,**/spi/**,**/advice/**,**/config/**</sonar.exclusions>
60+
<sonar.cpd.exclusions>**/dto/**,**/entity/**,**/config/**</sonar.cpd.exclusions>
61+
</properties>
62+
<dependencies>
63+
64+
<dependency>
65+
<groupId>junit</groupId>
66+
<artifactId>junit</artifactId>
67+
<version>4.13.1</version>
68+
<scope>test</scope>
69+
</dependency>
70+
71+
<dependency>
72+
<groupId>org.projectlombok</groupId>
73+
<artifactId>lombok</artifactId>
74+
<version>1.18.22</version>
75+
<scope>compile</scope>
76+
</dependency>
77+
78+
<dependency>
79+
<groupId>io.mosip.esignet</groupId>
80+
<artifactId>esignet-core</artifactId>
81+
<version>${esignet.version}</version>
82+
<scope>provided</scope>
83+
</dependency>
84+
85+
<dependency>
86+
<groupId>io.mosip.esignet</groupId>
87+
<artifactId>esignet-integration-api</artifactId>
88+
<version>${esignet.version}</version>
89+
<scope>provided</scope>
90+
</dependency>
91+
<dependency>
92+
<groupId>com.sun.xml.ws</groupId>
93+
<artifactId>jaxws-rt</artifactId>
94+
<version>2.3.3</version>
95+
</dependency>
96+
97+
98+
<dependency>
99+
<groupId>io.mosip.kernel</groupId>
100+
<artifactId>kernel-keymanager-service</artifactId>
101+
<version>1.2.0.1</version>
102+
<scope>provided</scope>
103+
<classifier>lib</classifier>
104+
<exclusions>
105+
<exclusion>
106+
<groupId>org.springframework.cloud</groupId>
107+
<artifactId>spring-cloud-starter-sleuth</artifactId>
108+
</exclusion>
109+
<exclusion>
110+
<groupId>org.springframework.security</groupId>
111+
<artifactId>spring-security-test</artifactId>
112+
</exclusion>
113+
</exclusions>
114+
</dependency>
115+
<!-- <dependency>-->
116+
<!-- <groupId>info.weboftrust</groupId>-->
117+
<!-- <artifactId>ld-signatures-java</artifactId>-->
118+
<!-- <version>1.0.0</version>-->
119+
<!-- </dependency>-->
120+
<dependency>
121+
<groupId>org.slf4j</groupId>
122+
<artifactId>slf4j-api</artifactId>
123+
<version>1.7.30</version>
124+
<scope>provided</scope>
125+
</dependency>
126+
<dependency>
127+
<groupId>com.fasterxml.jackson.dataformat</groupId>
128+
<artifactId>jackson-dataformat-xml</artifactId>
129+
<version>2.9.8</version>
130+
</dependency>
131+
</dependencies>
132+
<build>
133+
<plugins>
134+
<!-- assembly-plugin -->
135+
<plugin>
136+
<groupId>org.apache.maven.plugins</groupId>
137+
<artifactId>maven-assembly-plugin</artifactId>
138+
<version>${maven-assembly-plugin.version}</version>
139+
<configuration>
140+
<descriptorRefs>
141+
<descriptorRef>jar-with-dependencies</descriptorRef>
142+
</descriptorRefs>
143+
<appendAssemblyId>false</appendAssemblyId>
144+
</configuration>
145+
<executions>
146+
<execution>
147+
<id>make-assembly</id>
148+
<phase>package</phase>
149+
<goals>
150+
<goal>single</goal>
151+
</goals>
152+
</execution>
153+
</executions>
154+
</plugin>
155+
<plugin>
156+
<groupId>org.apache.maven.plugins</groupId>
157+
<artifactId>maven-javadoc-plugin</artifactId>
158+
<version>${maven-javadoc-plugin.version}</version>
159+
<executions>
160+
<execution>
161+
<id>attach-javadocs</id>
162+
<goals>
163+
<goal>jar</goal>
164+
</goals>
165+
</execution>
166+
</executions>
167+
<configuration>
168+
<doclint>none</doclint>
169+
<sourcepath>src/main/java</sourcepath>
170+
</configuration>
171+
</plugin>
172+
<plugin>
173+
<artifactId>maven-deploy-plugin</artifactId>
174+
<version>2.8.1</version>
175+
<executions>
176+
<execution>
177+
<id>default-deploy</id>
178+
<phase>deploy</phase>
179+
<goals>
180+
<goal>deploy</goal>
181+
</goals>
182+
</execution>
183+
</executions>
184+
</plugin>
185+
<plugin>
186+
<groupId>org.sonatype.plugins</groupId>
187+
<artifactId>nexus-staging-maven-plugin</artifactId>
188+
<version>1.6.7</version>
189+
<extensions>true</extensions>
190+
<executions>
191+
<execution>
192+
<id>default-deploy</id>
193+
<phase>deploy</phase>
194+
<goals>
195+
<goal>deploy</goal>
196+
</goals>
197+
</execution>
198+
</executions>
199+
<configuration>
200+
<serverId>ossrh</serverId>
201+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
202+
<autoReleaseAfterClose>false</autoReleaseAfterClose>
203+
</configuration>
204+
</plugin>
205+
206+
<plugin>
207+
<groupId>org.apache.maven.plugins</groupId>
208+
<artifactId>maven-source-plugin</artifactId>
209+
<inherited>true</inherited>
210+
<version>2.2.1</version>
211+
<executions>
212+
<execution>
213+
<id>attach-sources</id>
214+
<goals>
215+
<goal>jar-no-fork</goal>
216+
</goals>
217+
</execution>
218+
</executions>
219+
</plugin>
220+
<plugin>
221+
<groupId>org.apache.maven.plugins</groupId>
222+
<artifactId>maven-gpg-plugin</artifactId>
223+
<version>1.5</version>
224+
<executions>
225+
<execution>
226+
<id>sign-artifacts</id>
227+
<phase>verify</phase>
228+
<goals>
229+
<goal>sign</goal>
230+
</goals>
231+
<configuration>
232+
<gpgArguments>
233+
<arg>--pinentry-mode</arg>
234+
<arg>loopback</arg>
235+
</gpgArguments>
236+
</configuration>
237+
</execution>
238+
</executions>
239+
</plugin>
240+
<plugin>
241+
<groupId>pl.project13.maven</groupId>
242+
<artifactId>git-commit-id-plugin</artifactId>
243+
<version>3.0.1</version>
244+
<executions>
245+
<execution>
246+
<id>get-the-git-infos</id>
247+
<goals>
248+
<goal>revision</goal>
249+
</goals>
250+
<phase>validate</phase>
251+
</execution>
252+
</executions>
253+
<configuration>
254+
<generateGitPropertiesFile>true</generateGitPropertiesFile>
255+
<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
256+
<includeOnlyProperties>
257+
<includeOnlyProperty>^git.build.(time|version)$</includeOnlyProperty>
258+
<includeOnlyProperty>^git.commit.id.(abbrev|full)$</includeOnlyProperty>
259+
</includeOnlyProperties>
260+
<commitIdGenerationMode>full</commitIdGenerationMode>
261+
<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
262+
<!-- <format>json</format> -->
263+
</configuration>
264+
</plugin>
265+
<plugin>
266+
<groupId>org.apache.maven.plugins</groupId>
267+
<artifactId>maven-surefire-plugin</artifactId>
268+
<version>2.22.0</version>
269+
<configuration>
270+
<skipTests>false</skipTests>
271+
<skip>false</skip>
272+
<argLine>
273+
${argLine} --add-opens
274+
java.xml/jdk.xml.internal=ALL-UNNAMED
275+
--illegal-access=permit
276+
</argLine>
277+
</configuration>
278+
</plugin>
279+
<plugin>
280+
<groupId>org.jacoco</groupId>
281+
<artifactId>jacoco-maven-plugin</artifactId>
282+
<version>${maven.jacoco.version}</version>
283+
<executions>
284+
<execution>
285+
<goals>
286+
<goal>prepare-agent</goal>
287+
</goals>
288+
</execution>
289+
<execution>
290+
<id>report</id>
291+
<phase>prepare-package</phase>
292+
<goals>
293+
<goal>report</goal>
294+
</goals>
295+
</execution>
296+
</executions>
297+
</plugin>
298+
</plugins>
299+
</build>
300+
</project>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package io.compass.esignet.plugin.dto;
2+
3+
4+
import lombok.AllArgsConstructor;
5+
import lombok.Data;
6+
7+
import java.io.Serializable;
8+
import java.time.LocalDateTime;
9+
10+
11+
@Data
12+
@AllArgsConstructor
13+
public class KycAuth implements Serializable {
14+
15+
private String kycToken;
16+
private String partnerSpecificUserToken;
17+
private LocalDateTime responseTime;
18+
private String transactionId;
19+
private String individualId;
20+
private UserInfo userInfo;
21+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package io.compass.esignet.plugin.dto;
2+
3+
import lombok.AllArgsConstructor;
4+
import lombok.Data;
5+
6+
@Data
7+
@AllArgsConstructor
8+
public class NotificationRequest {
9+
private String number;
10+
private String message;
11+
}
12+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package io.compass.esignet.plugin.dto;
2+
3+
import lombok.Data;
4+
5+
@Data
6+
public class NotificationResponse {
7+
private String status;
8+
}

0 commit comments

Comments
 (0)