Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
a6f0b96
Update UserController.java
mahesh-maney Aug 10, 2023
65c1279
Update UserHandler.java
mahesh-maney Aug 10, 2023
5445c51
Update UserService.java
mahesh-maney Aug 10, 2023
988357a
Update UserController.java
mahesh-maney Aug 11, 2023
05a2ea1
Update UserHandler.java
mahesh-maney Aug 11, 2023
86c214c
Update UserService.java
mahesh-maney Aug 11, 2023
b174558
Update UserService.java
mahesh-maney Aug 11, 2023
1fde28a
Update UserService.java
mahesh-maney Aug 11, 2023
304ee8c
Update UserController.java
mahesh-maney Aug 11, 2023
e448a7e
Update UserHandler.java
mahesh-maney Aug 11, 2023
6839142
Update UserService.java
mahesh-maney Aug 11, 2023
976e7ff
Update application.properties
mahesh-maney Aug 11, 2023
13f8c99
Update UserService.java
mahesh-maney Aug 11, 2023
c0a0b51
Update UserService.java
mahesh-maney Aug 11, 2023
abc43a5
Update application.properties
mahesh-maney Aug 11, 2023
c5c9a48
Update UserService.java
mahesh-maney Aug 11, 2023
53dfe8a
adding keycloak based user management
mahesh-maney Aug 14, 2023
44a3a52
Revert "Update UserService.java"
mahesh-maney Aug 15, 2023
a47bc5b
fix for creating users on keycloak <ManeyMR>.
mahesh-maney Aug 15, 2023
ff9756b
adding keyclaok features <ManeyMR>.
mahesh-maney Aug 15, 2023
97b8475
added the logs in utility package classes
lakshmi551 Aug 16, 2023
6c1fbb7
Merge pull request #3 from UPHRH-platform/keycloak_logs
mahesh-maney Aug 16, 2023
95cdb13
add user details api <ManeyMR>.
mahesh-maney Aug 16, 2023
32a855b
fix for arrayindexoutofbound exception <MandeyMR>.
mahesh-maney Aug 16, 2023
a4d1c01
updating changes to create user and list user APIs <ManeyMR>.
mahesh-maney Aug 17, 2023
6147178
fixing update user API <ManeyMR>.
mahesh-maney Aug 17, 2023
79ec4c9
adding try-catch <ManeyMR>.
mahesh-maney Aug 18, 2023
e5acd36
resolving issues <ManeyMR>.
mahesh-maney Aug 18, 2023
2190a35
fixing login and otp invoking issues <ManeyMR>
mahesh-maney Aug 18, 2023
3e21012
resolving issues for login and generate otp use case <ManeyMR>
mahesh-maney Aug 18, 2023
4223d59
adding logs to response from keyclopak <ManeyMR>.
mahesh-maney Aug 19, 2023
dd39622
returning the newly created user's id <ManeyMR>.
mahesh-maney Aug 21, 2023
f9749ef
adding changes to activate and deactivate users <ManeyMR>.
mahesh-maney Aug 21, 2023
c65c772
adding logs while saving user to DB <ManeyMR>.
mahesh-maney Aug 21, 2023
c506ae3
resolving data ssync issues <ManeyMR>.
mahesh-maney Aug 21, 2023
f33e4fc
fixing issue with generating auth token <ManeyMR>.
mahesh-maney Aug 21, 2023
3046025
resolving json format issues with payload <ManeyMR>.
mahesh-maney Aug 21, 2023
719b831
using email instead of user-id while saving info to DB <ManeyMR>.
mahesh-maney Aug 21, 2023
6f421cb
payment gateway <ManeyMR>.
mahesh-maney Aug 21, 2023
96441cd
adding postgres properties <ManeyMR>.
mahesh-maney Aug 21, 2023
e588ca8
resolving db issues <ManeyMR>.
mahesh-maney Aug 21, 2023
45f32a0
user login and send mail APIs added <ManeyMR>.
mahesh-maney Aug 22, 2023
734a26b
adding send email otp and login APIs <ManeyMR>
mahesh-maney Aug 22, 2023
aea96e8
payment redirection route
ankitv89 Aug 22, 2023
89e269b
feature for payment gateway response handler <ManeyMR>.
mahesh-maney Aug 22, 2023
9c20557
adding payment respone feature <ManeyMR>.
mahesh-maney Aug 22, 2023
9aa8bb7
Merge branch 'main' into payment-webhook
mahesh-maney Aug 22, 2023
2c1fb02
Merge pull request #4 from UPHRH-platform/payment-webhook
mahesh-maney Aug 22, 2023
842ddfa
resolving compilation issues <ManeyMR>.
mahesh-maney Aug 22, 2023
546e7e1
converting get to post <ManeyMR>.
mahesh-maney Aug 22, 2023
67b5c87
updating payment response <ManeyMR>.
mahesh-maney Aug 23, 2023
1166b1f
fixing null pointer issue <ManeyMR>.
mahesh-maney Aug 23, 2023
0f82c87
changing the header for request <ManeyMR>.
mahesh-maney Aug 23, 2023
2e27cee
changing the header type <ManeyMR>.
mahesh-maney Aug 23, 2023
ae129af
adding url to properties and changing the condition of payment succes…
mahesh-maney Aug 23, 2023
07ec6fc
adding capability to identify which module made a payment <ManeyMR>.
mahesh-maney Aug 28, 2023
cf93518
correcting manadatory fields label <ManeyMR>
mahesh-maney Aug 28, 2023
7de7dd9
adding affiliation <ManeyMR>.
mahesh-maney Aug 28, 2023
bbe5e24
Added transaction entity and save feature
Radheshhathwar Aug 28, 2023
4dfc4b4
pagination for list users feature <ManeyMR>.
mahesh-maney Aug 28, 2023
fc6d660
rearranging transaction code <ManeyMR>.
mahesh-maney Aug 28, 2023
391e614
checking for null <ManeyMR>.
mahesh-maney Aug 28, 2023
4c00ada
Changes the date format
Radheshhathwar Aug 29, 2023
dbacc23
adding transaction deatils to return url <ManeyMR>.
mahesh-maney Aug 29, 2023
14064d1
adding an API to fetch user info by email attribute <ManeyMR>.
mahesh-maney Aug 29, 2023
9ebaae1
Added fetchAll and fetchBy uniqueRefNum
Radheshhathwar Aug 29, 2023
c9c2ab6
adding logger <ManeyMR>.
mahesh-maney Aug 30, 2023
4e9f999
adding more loggers <ManeyMR>.
mahesh-maney Aug 30, 2023
293b6ef
adding user count to list user API <ManeyMR>.
mahesh-maney Aug 30, 2023
6d5fd5a
adding null checks for failed transactions <ManeyMR>.
mahesh-maney Aug 31, 2023
abbdde2
saving user info while updating the user <ManeyMR>.
mahesh-maney Sep 1, 2023
9318efd
adding loggers to print repsonse <ManeyMR>.
mahesh-maney Sep 4, 2023
5d3e79d
adding loggers to debug <MAneyMR>.
mahesh-maney Sep 4, 2023
2e337ef
adding email instaed of username to save user info <ManeyMR>.
mahesh-maney Sep 4, 2023
d990b56
adding user listing feature with user attribute search <ManeyMR>.
mahesh-maney Sep 14, 2023
b6ed69e
adding pagination feature to user details <ManeyMR>.
mahesh-maney Sep 14, 2023
6f9b1ae
changing the http contract method <ManeyMR>.
mahesh-maney Sep 14, 2023
0d786d4
moving this feature sunbird-rc <ManeyMR>.
mahesh-maney Sep 14, 2023
e87d26c
reverting DB <ManeyMR>.
mahesh-maney Sep 14, 2023
6ce6c5a
adding endpoint to fetch user attribute <ManeyMR>.
mahesh-maney Sep 14, 2023
0ee94c3
changes for updating fee
shishirsuman092 Oct 6, 2023
4e93eed
changes for updating fee
shishirsuman092 Oct 6, 2023
3332860
changes for updating fee
shishirsuman092 Oct 6, 2023
0bba440
Merge pull request #5 from UPHRH-platform/feature_update_fee
ankitv89 Oct 6, 2023
255fc77
changes for updating fee
shishirsuman092 Oct 11, 2023
09d82c2
Merge pull request #6 from UPHRH-platform/feature_update_fee
shishirsuman092 Oct 11, 2023
eac33ce
changes for updating fee
shishirsuman092 Oct 11, 2023
de631e3
Merge pull request #7 from UPHRH-platform/feature_update_fee
shishirsuman092 Oct 11, 2023
dacbb8b
changes for adding module name
shishirsuman092 Oct 11, 2023
48797be
Merge pull request #8 from UPHRH-platform/feature_update_fee
shishirsuman092 Oct 11, 2023
89cc00c
Update PaymentServiceImpl.java
shishirsuman092 Oct 11, 2023
7909ed6
Handling deserialization issue
shishirsuman092 Oct 11, 2023
654df58
Update issue templates
mahesh-maney Jun 27, 2024
b860341
Create maven.yml
mahesh-maney Aug 20, 2024
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
Binary file added .DS_Store
Binary file not shown.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
35 changes: 35 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Java CI with Maven

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
38 changes: 38 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,44 @@
<artifactId>spring-boot-starter-json</artifactId>
<version>2.5.6</version>
</dependency>

<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-admin-client</artifactId>
<version>21.1.2</version>
</dependency>

<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
<version>21.1.2</version>
</dependency>

<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.20</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
<version>2.2.3</version>
</dependency>

<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>2.7.14</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<version>2.7.14</version>
</dependency>

</dependencies>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
package com.tarento.upsmf.userManagement;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
@EnableJpaRepositories
@EnableAutoConfiguration
public class UserManagementApplication {
public static void main(String[] args) {
SpringApplication.run(UserManagementApplication.class, args);
}

@Bean
public RestTemplate restTemplate() {
return new RestTemplate();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,110 @@

import com.fasterxml.jackson.databind.JsonNode;
import com.tarento.upsmf.userManagement.handler.UserHandler;
import com.tarento.upsmf.userManagement.model.Transaction;
import com.tarento.upsmf.userManagement.services.PaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;
import java.net.URISyntaxException;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;

@RestController(value = "/api/v1/user)")
@RestController
@RequestMapping(value = "/api/v1/user")
public class UserController {

@Autowired
PaymentService paymentService;

@Autowired
private UserHandler userHandler;

@PostMapping(value = "/create", consumes = "application/json", produces = "application/json")
public ResponseEntity<JsonNode> createUser(@RequestBody final JsonNode body) throws URISyntaxException {
public String createUser(@RequestBody final JsonNode body) throws URISyntaxException, IOException {
return userHandler.createUser(body);
}

@PutMapping(value = "/update", consumes = "application/json", produces = "application/json")
public ResponseEntity<JsonNode> updateUser(@RequestBody final JsonNode body) throws URISyntaxException {
public String updateUser(@RequestBody final JsonNode body) throws URISyntaxException, IOException {
return userHandler.updateUser(body);
}

@PostMapping(value = "/details", consumes = "application/json", produces = "application/json")
public String userDetails(@RequestBody final JsonNode body) throws URISyntaxException, IOException {
return userHandler.userDetails(body);
}

@PostMapping(value = "/emaildetails", consumes = "application/json", produces = "application/json")
public String userEmailDetails(@RequestBody final JsonNode body) throws URISyntaxException, IOException {
return userHandler.userEmailDetails(body);
}

@PostMapping(value = "/list", consumes = "application/json", produces = "application/json")
public ResponseEntity<JsonNode> listUser(@RequestBody final JsonNode body) throws URISyntaxException {
public String listUser(@RequestBody final JsonNode body) throws URISyntaxException, IOException {
return userHandler.listUser(body);
}

@GetMapping(value = "/count", produces = "application/json")
public String userCount() throws IOException {
return userHandler.userCount();
}

@PostMapping(value = "/activate", consumes = "application/json", produces = "application/json")
public ResponseEntity<JsonNode> activateUser(@RequestBody final JsonNode body) throws URISyntaxException {
public String activateUser(@RequestBody final JsonNode body) throws URISyntaxException, IOException {
return userHandler.activateUser(body);
}

@PostMapping(value = "/deactivate", consumes = "application/json", produces = "application/json")
public ResponseEntity<JsonNode> deactivateUser(@RequestBody final JsonNode body) throws URISyntaxException {
public String deactivateUser(@RequestBody final JsonNode body) throws URISyntaxException, IOException {
return userHandler.deactivateUser(body);
}

@GetMapping(value = "/sms/otp", produces = "application/json")
public ResponseEntity<String> sendOTP(@RequestParam String phoneNumber, @RequestParam String name, @RequestParam String otp) throws URISyntaxException {
return userHandler.sendOTP(phoneNumber, name, otp);
}

@PostMapping(value = "/keycloak/otp", consumes = "application/json", produces = "application/json")
public ResponseEntity<String> generateOTP(@RequestBody String email) throws URISyntaxException, IOException {
return userHandler.generateOTP(email);
}

@PostMapping(value = "/keycloak/login", consumes = "application/json", produces = "application/json")
public ResponseEntity<String> login(@RequestBody JsonNode body ) throws URISyntaxException, IOException {
return userHandler.login(body);
}

@PostMapping(value = "/payment", consumes = {"*/*"})
public ResponseEntity<String> paymentRedirect(@RequestParam Map<String, String> requestData) throws URISyntaxException, IOException {
return userHandler.paymentRedirect(requestData);
}

@PostMapping(value = "/keycloak/usrlogin")
public String usrlogin(@RequestBody JsonNode body) throws IOException {
return userHandler.usrLogin(body);
}

@PostMapping(value = "/keycloak/usrOTP")
public String usrOTP(@RequestBody JsonNode body) throws IOException {
return userHandler.usrOTP(body);
}

@GetMapping(value = "/transaction", produces = "application/json")
public ResponseEntity<List<Transaction>> getAllTransactions() {
return userHandler.getAllTransactions();
}

@GetMapping(value = "/transaction/{uniqueRefNumber}", produces = "application/json")
public ResponseEntity<?> getTransactionByUniqueRefNumber(@PathVariable String uniqueRefNumber) {
return userHandler.getTransactionByUniqueRefNumber(uniqueRefNumber);
}

@PostMapping(value = "/attribute", produces = "application/json")
public ResponseEntity<String> getUserByAttribute(@RequestBody JsonNode body) throws SQLException, IOException, URISyntaxException {
return userHandler.getUserByAttribute(body);
}
}
Loading