Reformat file
This commit is contained in:
parent
d4b7ccbb72
commit
8ed00c6ee5
@ -22,10 +22,10 @@ public class GrpcAuthenticationClient implements IAuthenticationClient {
|
||||
AuthenticationRequest request = AuthenticationRequest.newBuilder().setEmail(email).setPassword(password).build();
|
||||
AuthenticationResponse response = blockingStub.authenticate(request);
|
||||
|
||||
if(response.getStatus().contains("NoSuchUserException"))
|
||||
if (response.getStatus().contains("NoSuchUserException"))
|
||||
throw new NoSuchUserException("User with email " + email + " could not be found");
|
||||
|
||||
if(response.getStatus().contains("AuthenticationException"))
|
||||
if (response.getStatus().contains("AuthenticationException"))
|
||||
throw new AuthenticationException("Password for user with email " + email + " was incorrect");
|
||||
|
||||
return response.getToken();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user