@Test @Order(2) void handlingDssAuthorizationCommandRequest() { restAuthActorRef.tell(DssAuthorizationCommandRequest .builder() .token(testToken) .valid(probe.ref()) .build()); final DssAuthorizationCommandResponse response = probe.expectMessageClass(DssAuthorizationCommandResponse.class); assertTrue(true); assertNotNull(response); assertEquals("true", response.getValid()); }
private Behavior<DssAuthCommand> handlingDssAuthorizationCommandRequest(DssAuthorizationCommandRequest request) { context.getLog().info("DssAuthorizationCommandRequest: {}", request); String token = request.getToken(); String valid = "false"; if(tokenList.contains(token) && verifyToken(token)) { valid = "true"; } request.getValid().tell(DssAuthorizationCommandResponse .builder() .valid(valid) .build() ); return Behaviors.same(); }
DssRestAuthActor { private Behavior<DssAuthCommand> handlingDssAuthorizationCommandRequest(DssAuthorizationCommandRequest request) { context.getLog().info("DssAuthorizationCommandRequest: {}", request); String token = request.getToken(); String valid = "false"; if(tokenList.contains(token) && verifyToken(token)) { valid = "true"; } request.getValid().tell(DssAuthorizationCommandResponse .builder() .valid(valid) .build() ); return Behaviors.same(); } }
DssRestAuthActor { private Behavior<DssAuthCommand> handlingDssAuthorizationCommandRequest(DssAuthorizationCommandRequest request) { context.getLog().info("DssAuthorizationCommandRequest: {}", request); String token = request.getToken(); String valid = "false"; if(tokenList.contains(token) && verifyToken(token)) { valid = "true"; } request.getValid().tell(DssAuthorizationCommandResponse .builder() .valid(valid) .build() ); return Behaviors.same(); } private  DssRestAuthActor(ActorContext<DssAuthCommand> context, Map<String, String> userList); }
DssRestAuthActor { private Behavior<DssAuthCommand> handlingDssAuthorizationCommandRequest(DssAuthorizationCommandRequest request) { context.getLog().info("DssAuthorizationCommandRequest: {}", request); String token = request.getToken(); String valid = "false"; if(tokenList.contains(token) && verifyToken(token)) { valid = "true"; } request.getValid().tell(DssAuthorizationCommandResponse .builder() .valid(valid) .build() ); return Behaviors.same(); } private  DssRestAuthActor(ActorContext<DssAuthCommand> context, Map<String, String> userList); static Behavior<DssAuthCommand> create(Map<String, String> userList); }
DssRestAuthActor { private Behavior<DssAuthCommand> handlingDssAuthorizationCommandRequest(DssAuthorizationCommandRequest request) { context.getLog().info("DssAuthorizationCommandRequest: {}", request); String token = request.getToken(); String valid = "false"; if(tokenList.contains(token) && verifyToken(token)) { valid = "true"; } request.getValid().tell(DssAuthorizationCommandResponse .builder() .valid(valid) .build() ); return Behaviors.same(); } private  DssRestAuthActor(ActorContext<DssAuthCommand> context, Map<String, String> userList); static Behavior<DssAuthCommand> create(Map<String, String> userList);  }