Logout configuration - pac4j/play-pac4j GitHub Wiki
You need to define a logout endpoint using the LogoutController
to handle logout.
>> Read the documentation to understand its behavior and the available options.
It is defined in the routes
file:
GET /logout @org.pac4j.play.LogoutController.logout(request: Request)
And in the SecurityModule
:
In Java:
LogoutController logoutController = new LogoutController();
logoutController.setDefaultUrl("/");
bind(LogoutController.class).toInstance(logoutController);
In Scala:
val logoutController = new LogoutController()
logoutController.setDefaultUrl("/")
bind(classOf[LogoutController]).toInstance(logoutController)