Question: @Autowired public ApplicationUserController ( ApplicationUserService applicationUserService, UserAuthService usersch super ( ) ; this.applicationUserService applicationUserService; this.userAuthService = userAuthService; } @PostMapping ( / register )
@Autowired public ApplicationUserController ApplicationUserService applicationUserService, UserAuthService usersch super; this.applicationUserService applicationUserService; this.userAuthService userAuthService; @PostMappingregister public ResponseEntity register @RequestBody ApplicationUser user boolean isRegistered userAuthService.registeredUseruser; if isRegistered return ResponseEntity.okbodymessage: Registration successful; else return Response Entity.badRequestbodymessage: Password or Username policy failed; I @PostMappingsignin public ResponseEntity signIn@RequestBody ApplicationUser user String token userAuthService.authenticateuser; if token null return ResponseEntity.okbodymessage: Authentication successful!token: token characters
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
