-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Student/Teacher/Officer | Password Operations APIs | SIS-115 (#63)
* Department Status Enum Class Has Been Added to DepartmentSqlScripts Class * TeacherLessonMapping Class Has Been Refactored * TeacherLesson GET Endpoint Has Been Updated * Get All By Status Methods Have Been Updated * STUDENT_PASSWORD_OPERATION_API_TAG Has Been Added to SisSwaggerConfiguration Class * feUrl Field Has Been Added to SisOperationInfoRequest Class * STUDENT_PASSWORD_OPERATION Endpoint Has Been Added to SisControllerEndpoint Class * unauthorizedResponse Method Has Been Added to SisResponseUtil Class * ForgotPasswordResponse Class Has Been Deleted * PasswordOutService Classes Have Been Created * StudentLoginMapping Class Has Been Moved to common Package * StudentLoginInfoEntity Class Has Been Moved to common Package * StudentLoginRequest Class Has Been Moved to common Package * StudentLogin Repository Classes Have Been Moved to common Package * StudentLogin Service Classes Have Been Moved to common Package and forgotPassword Method Has Been Deleted Because Method Has Been Moved to PasswordOperationService * StudentLoginController Class Has Been Moved to common Package * StudentLogin Out Service Classes Have Been Created * StudentPasswordOperationMapping Class Has Been Created * StudentPasswordChangeEntity Class Has Been Created * StudentPasswordOperationEntity Class Has Been Created * StudentPasswordChangeRequest Class Has Been Created * StudentPasswordForgotRequest Class Has Been Moved to password Package * Student Password Operation Response Classes Have Been Created * StudentPasswordOperationInfoConverter Class Has Been Created * Student Password Operation Repository Classes Have Been Created * Student Password Operation Service Classes Have Been Created * Student Password Operation Controller Classes Have Been Created * Student Password Operation Out Service Classes Have Been Created * getStudentInfoDetailResponse Method Has Been Added to StudentOutService * ChangePassword URL Has Been Added to Student Mails && Service Codes Has Been Refactored and Updated * Password Operations Have Been Added to Student Saving Processes * Teacher Login Operation Classes Have Been Moved to common Package * TEACHER_PASSWORD_OPERATION_API_TAG Has Been Added to SisSwaggerConfiguration Class * TEACHER_PASSWORD_OPERATION Endpoint Have Been Added to SisControllerEndpoint Class * final Key Has Been Added to studentId Parameter in isPasswordExist Method * final Key Has Been Added to studentId Parameter in getStudentInfoDetailResponse Method * Teacher Login Repository Classes Have Been Updated * Teacher/forgotPassword Method Has Been Deleted Because Method Has Been Added to password Package * final Key Has Been Added to academicInfoResponse and personalInfoResponse Parameters in convert Method * throws SisNotExistException Has Been Added to saveTeacher Method * teacherForgotPassword Method Has Been Deleted Because Method Has Been Added to password Package * Teacher Login Out Service Classes Have Been Created * getTeacherInfoDetailResponse and ifTeacherIsNotExistThrowNotExistException Methods Have Been Added to Teacher Out Service * throws SisNotExistException Has Been Added to saveTeacher Method * TeacherPasswordOperationMapping Class Has Been Created * TeacherPasswordOperation Request Classes Have Been Created * TeacherPasswordOperation Entity Classes Have Been Created * TeacherPasswordOperationInfoConverter Class Has Been Created * TeacherPasswordOperation Repository Classes Have Been Created * TeacherPasswordOperation Response Classes Have Been Created * TeacherPasswordOperation Service Classes Have Been Created * TeacherPasswordOperation Controller Classes Have Been Created * TeacherPasswordOperation Out Service Classes Have Been Created * ChangePassword URL Has Been Added to Teacher Mails && Service Codes Has Been Refactored and Updated * Password Operations Have Been Added to Teacher Saving Processes * Officer Login Operation Classes Have Been Moved to common Package * TeacherLogin Service Classes Have Been Updated * PasswordService Bean Has Been Deleted in TeacherLoginRepository Because It's Unused * officerForgotPassword Method Has Been Deleted Because It's Unused * OFFICER_PASSWORD_OPERATION Endpoint Has Been Added to SisControllerEndpoint Class * OFFICER_PASSWORD_OPERATION_API_TAG Has Been Added to SisSwaggerConfiguration Class * throws SisNotExistException Has Been Added to saveOfficer Method * throws SisNotExistException Has Been Deleted Because It's Unused * OfficerPasswordOperationMapping Class Has Been Created * OfficerPasswordChangeEntity and OfficerPasswordOperationEntity Classes Have Been Created * OfficerPasswordChangeRequest and OfficerPasswordForgotRequest Classes Have Been Created * OfficerPasswordChangeResponse, OfficerPasswordForgotResponse and OfficerPasswordOperationResponse Classes Have Been Created * OfficerPasswordOperationInfoConverter Class Has Been Created * OfficerPasswordOperation Repository Classes Have Been Created * OfficerPasswordOperation Service Classes Have Been Created * OfficerPasswordOperation Controller Classes Have Been Created * OfficerPasswordOperation Out Service Classes Have Been Created * OfficerLogin Repository Classes Have Been Updated and isPasswordExist Method Has Been Added to OfficerLogin Repository Classes * OfficerLogin Out Service Classes Have Been Created * Officer Out Service Classes Have Been Created * ChangePassword URL Has Been Added to Officer Mails && Service Codes Has Been Refactored and Updated * Password Operations Have Been Added to Officer Saving Processes
- Loading branch information
1 parent
be7dcd9
commit 9c3c610
Showing
119 changed files
with
2,602 additions
and
436 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
...nproject/studentinformationsystem/login/common/model/response/ForgotPasswordResponse.java
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
...m/graduationproject/studentinformationsystem/login/common/service/PasswordOutService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.graduationproject.studentinformationsystem.login.common.service; | ||
|
||
public interface PasswordOutService { | ||
|
||
String getEncodedPassword(String newPassword); | ||
} |
18 changes: 18 additions & 0 deletions
18
...ionproject/studentinformationsystem/login/common/service/impl/PasswordOutServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.graduationproject.studentinformationsystem.login.common.service.impl; | ||
|
||
import com.graduationproject.studentinformationsystem.login.common.service.PasswordOutService; | ||
import com.graduationproject.studentinformationsystem.login.common.service.PasswordService; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
@RequiredArgsConstructor | ||
public class PasswordOutServiceImpl implements PasswordOutService { | ||
|
||
private final PasswordService passwordService; | ||
|
||
@Override | ||
public String getEncodedPassword(String newPassword) { | ||
return passwordService.encodePassword(newPassword); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...request/OfficerForgotPasswordRequest.java → ...request/OfficerForgotPasswordRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...odel/dto/request/OfficerLoginRequest.java → ...odel/dto/request/OfficerLoginRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../model/entity/OfficerLoginInfoEntity.java → .../model/entity/OfficerLoginInfoEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...er/model/mapping/OfficerLoginMapping.java → ...on/model/mapping/OfficerLoginMapping.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
...er/repository/OfficerLoginRepository.java → ...on/repository/OfficerLoginRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
package com.graduationproject.studentinformationsystem.login.officer.repository; | ||
package com.graduationproject.studentinformationsystem.login.officer.common.repository; | ||
|
||
import com.graduationproject.studentinformationsystem.login.officer.model.entity.OfficerLoginInfoEntity; | ||
import com.graduationproject.studentinformationsystem.login.officer.common.model.entity.OfficerLoginInfoEntity; | ||
|
||
public interface OfficerLoginRepository { | ||
|
||
Integer getFailCounter(Long officerId); | ||
|
||
String getPassword(Long officerId); | ||
|
||
void saveFirstPassword(Long officerId, String password); | ||
void savePassword(Long officerId, String encodedPassword); | ||
|
||
void updatePassword(Long officerId, String password); | ||
void updatePassword(Long officerId, String encodedPassword); | ||
|
||
void updateLoginInfo(OfficerLoginInfoEntity loginInfoEntity); | ||
|
||
void updateFailCounter(Long officerId); | ||
|
||
boolean isPasswordExist(Long officerId); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...project/studentinformationsystem/login/officer/common/service/OfficerLoginOutService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.graduationproject.studentinformationsystem.login.officer.common.service; | ||
|
||
public interface OfficerLoginOutService { | ||
|
||
void saveOrUpdatePassword(Long officerId, String encodedPassword); | ||
} |
9 changes: 9 additions & 0 deletions
9
...ionproject/studentinformationsystem/login/officer/common/service/OfficerLoginService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.graduationproject.studentinformationsystem.login.officer.common.service; | ||
|
||
import com.graduationproject.studentinformationsystem.login.common.model.response.LoginResponse; | ||
import com.graduationproject.studentinformationsystem.login.officer.common.model.dto.request.OfficerLoginRequest; | ||
|
||
public interface OfficerLoginService { | ||
|
||
LoginResponse login(OfficerLoginRequest loginRequest); | ||
} |
25 changes: 25 additions & 0 deletions
25
...tudentinformationsystem/login/officer/common/service/impl/OfficerLoginOutServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.graduationproject.studentinformationsystem.login.officer.common.service.impl; | ||
|
||
import com.graduationproject.studentinformationsystem.login.officer.common.repository.OfficerLoginRepository; | ||
import com.graduationproject.studentinformationsystem.login.officer.common.service.OfficerLoginOutService; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
@RequiredArgsConstructor | ||
public class OfficerLoginOutServiceImpl implements OfficerLoginOutService { | ||
|
||
private final OfficerLoginRepository officerLoginRepository; | ||
|
||
@Override | ||
public void saveOrUpdatePassword(final Long officerId, final String encodedPassword) { | ||
|
||
boolean isPasswordExist = officerLoginRepository.isPasswordExist(officerId); | ||
|
||
if (!isPasswordExist) { | ||
officerLoginRepository.savePassword(officerId, encodedPassword); | ||
} else { | ||
officerLoginRepository.updatePassword(officerId, encodedPassword); | ||
} | ||
} | ||
} |
Oops, something went wrong.