Skip to content

Instantly share code, notes, and snippets.

@GaetanoPiazzolla
Created January 30, 2022 19:51
Show Gist options
  • Save GaetanoPiazzolla/fcf752ebb3d9712734d800ed1250bb91 to your computer and use it in GitHub Desktop.
Save GaetanoPiazzolla/fcf752ebb3d9712734d800ed1250bb91 to your computer and use it in GitHub Desktop.
LogoutController which writes on RedisCache
@RestController
@RequestMapping("/logout")
public class LogoutController {
@Autowired
private BlackListingService blackListingService;
@Autowired
private UserRequestScopedBean userRequestScopedBean;
@PutMapping
public ResponseEntity<Void> logout() {
blackListingService.blackListJwt(userRequestScopedBean.getJwt());
return ResponseEntity.ok(null);
}
}
@GaetanoPiazzolla
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment