Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Commit 149e3ac

Browse files
committed
fixed some typos
1 parent 97a2be9 commit 149e3ac

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/de/filefighter/rest/domain/authentication/AuthenticationBusinessService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ public User authenticateUserWithUsernameAndPassword(String base64encodedUserAndP
4545
String[] split = decodedUsernameAndPassword.split(":");
4646

4747
if (split.length != 2)
48-
throw new RequestDidntMeetFormalRequirementsException("Credentials didnt meet formal requirements.");
48+
throw new RequestDidntMeetFormalRequirementsException("Credentials didn't meet formal requirements.");
4949

5050
String lowerCaseUsername = inputSanitizerService.sanitizeString(split[0].toLowerCase());
5151
String password = inputSanitizerService.sanitizeString(split[1]);
5252

5353
if (!inputSanitizerService.passwordIsValid(password))
54-
throw new UserNotAuthenticatedException("The password didnt match requirenments, please hash the password with SHA-256.");
54+
throw new UserNotAuthenticatedException("The password didn't match requirements, please hash the password with SHA-256.");
5555

5656
UserEntity userEntity = userRepository.findByLowercaseUsername(lowerCaseUsername);
5757
if (null == userEntity)

src/test/java/de/filefighter/rest/domain/authentication/AuthenticationBusinessServiceUnitTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ void authenticateUserWithUsernameAndPasswordThrows() {
5050

5151
ex = assertThrows(RequestDidntMeetFormalRequirementsException.class, () ->
5252
authenticationBusinessService.authenticateUserWithUsernameAndPassword(base64EncodedUsernameOnly));
53-
assertEquals(RequestDidntMeetFormalRequirementsException.getErrorMessagePrefix() + " Credentials didnt meet formal requirements.", ex.getMessage());
53+
assertEquals(RequestDidntMeetFormalRequirementsException.getErrorMessagePrefix() + " Credentials didn't meet formal requirements.", ex.getMessage());
5454

5555
UserNotAuthenticatedException noAuthEx = assertThrows(UserNotAuthenticatedException.class, () ->
5656
authenticationBusinessService.authenticateUserWithUsernameAndPassword(base64EncodedUsernameAndPassword));
57-
assertEquals(UserNotAuthenticatedException.getErrorMessagePrefix() + " The password didnt match requirenments, please hash the password with SHA-256.", noAuthEx.getMessage());
57+
assertEquals(UserNotAuthenticatedException.getErrorMessagePrefix() + " The password didn't match requirements, please hash the password with SHA-256.", noAuthEx.getMessage());
5858

5959
when(inputSanitizerServiceMock.passwordIsValid(any())).thenReturn(true);
6060
when(userRepositoryMock.findByLowercaseUsername(any())).thenReturn(null);

0 commit comments

Comments
 (0)