Browse Source

Update BookStoreAccessDeniedHandler class

Signed-off-by: Pekka Helenius <fincer89@hotmail.com>
v0.0.3-alpha
Pekka Helenius 4 years ago
parent
commit
e2ad9e1505
1 changed files with 1 additions and 4 deletions
  1. +1
    -4
      bookstore/src/main/java/com/fjordtek/bookstore/service/session/BookStoreAccessDeniedHandler.java

+ 1
- 4
bookstore/src/main/java/com/fjordtek/bookstore/service/session/BookStoreAccessDeniedHandler.java View File

@ -12,7 +12,6 @@ import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.web.access.AccessDeniedHandler;
import org.springframework.stereotype.Component;
import com.fjordtek.bookstore.service.HttpServerLogger;
@ -26,7 +25,6 @@ import com.fjordtek.bookstore.service.HttpServerLogger;
* @author Pekka Helenius
*/
@Component
public class BookStoreAccessDeniedHandler implements AccessDeniedHandler {
private HttpServerLogger httpServerLogger = new HttpServerLogger();
@ -45,8 +43,7 @@ public class BookStoreAccessDeniedHandler implements AccessDeniedHandler {
httpServerLogger.log(requestData, responseData);
}
responseData.setHeader("Location", "/");
responseData.setStatus(302);
responseData.sendRedirect("/");
}
}

Loading…
Cancel
Save