ceuma_api/src/main/java/com/ceuma/api/resource/TokenResource.java
// Removendo token do cookie - logout
Removendo token do cookie - logout
Removendo token do cookie - logout
@DeleteMapping("/revoke")
	public void remove(HttpServletRequest req, HttpServletResponse resp) {
		Cookie cookie = new Cookie("refreshToken", null);
		cookie.setHttpOnly(true);
		cookie.setSecure(apiProperty.getSecurity().isEnableHttps());
		cookie.setPath(req.getContextPath() + "/oauth/token");
		cookie.setMaxAge(0);
		resp.addCookie(cookie);
		resp.setStatus(HttpStatus.NO_CONTENT.value());
	}
@ DeleteMapping ( "/revoke" ) public void remove ( HttpServletRequest req , HttpServletResponse resp ) { Cookie cookie = new Cookie ( "refreshToken" , null ) ; cookie . setHttpOnly ( true ) ; cookie . setSecure ( apiProperty . getSecurity ( ) . isEnableHttps ( ) ) ; cookie . setPath ( req . getContextPath ( ) + "/oauth/token" ) ; cookie . setMaxAge ( 0 ) ; resp . addCookie ( cookie ) ; resp . setStatus ( HttpStatus . NO_CONTENT . value ( ) ) ; }
Removendo token do cookie - logout
Removendo token do cookie - logout