Reformat file
This commit is contained in:
parent
8ed00c6ee5
commit
fd89f5988e
@ -39,7 +39,7 @@ public class GrpcServerRunner extends AuthServiceGrpc.AuthServiceImplBase implem
|
||||
try {
|
||||
String token = authenticationService.authenticate(request.getEmail(), request.getPassword());
|
||||
response = AuthenticationResponse.newBuilder().setStatus("").setToken(token).build();
|
||||
} catch (NoSuchUserException e){
|
||||
} catch (NoSuchUserException e) {
|
||||
response = AuthenticationResponse.newBuilder().setStatus("NoSuchUserException").build();
|
||||
} catch (AuthenticationException e) {
|
||||
response = AuthenticationResponse.newBuilder().setStatus("AuthenticationException").build();
|
||||
@ -53,7 +53,7 @@ public class GrpcServerRunner extends AuthServiceGrpc.AuthServiceImplBase implem
|
||||
public void validateToken(TokenValidationRequest request, StreamObserver<TokenValidationResponse> responseObserver) {
|
||||
TokenValidationResponse response = TokenValidationResponse.newBuilder().setValid(false).build();
|
||||
|
||||
if(authenticationService.isValid(request.getToken()))
|
||||
if (authenticationService.isValid(request.getToken()))
|
||||
response = TokenValidationResponse.newBuilder().setValid(true).build();
|
||||
|
||||
responseObserver.onNext(response);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user