Package io.micronaut.security.endpoints
Class LogoutController
- java.lang.Object
- 
- io.micronaut.security.endpoints.LogoutController
 
- 
 @Requires(property="micronaut.security.endpoints.logout.enabled", value="true") @Controller("${micronaut.security.endpoints.logout.path:/logout}") @Secured("isAnonymous()") public class LogoutController extends java.lang.Object- Since:
- 1.0
- Author:
- Sergio del Amo
 
- 
- 
Constructor SummaryConstructors Constructor Description LogoutController(LogoutHandler logoutHandler, io.micronaut.context.event.ApplicationEventPublisher eventPublisher)Deprecated.LogoutController(LogoutHandler logoutHandler, io.micronaut.context.event.ApplicationEventPublisher eventPublisher, LogoutControllerConfiguration logoutControllerConfiguration)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected io.micronaut.http.HttpResponsehandleLogout(io.micronaut.http.HttpRequest<?> request, Authentication authentication)io.micronaut.http.HttpResponseindex(io.micronaut.http.HttpRequest<?> request, Authentication authentication)POST endpoint for Logout Controller.io.micronaut.http.HttpResponseindexGet(io.micronaut.http.HttpRequest<?> request, Authentication authentication)GET endpoint for Logout Controller.
 
- 
- 
- 
Constructor Detail- 
LogoutController@Inject public LogoutController(@Nullable LogoutHandler logoutHandler, io.micronaut.context.event.ApplicationEventPublisher eventPublisher, LogoutControllerConfiguration logoutControllerConfiguration)- Parameters:
- logoutHandler- A collaborator which helps to build HTTP response if user logout.
- eventPublisher- The application event publisher
- logoutControllerConfiguration- Configuration for the Logout controller
 
 - 
LogoutController@Deprecated public LogoutController(@Nullable LogoutHandler logoutHandler, io.micronaut.context.event.ApplicationEventPublisher eventPublisher)Deprecated.- Parameters:
- logoutHandler- A collaborator which helps to build HTTP response if user logout.
- eventPublisher- The application event publisher
 
 
- 
 - 
Method Detail- 
index@Consumes({"application/x-www-form-urlencoded","application/json"}) @Post public io.micronaut.http.HttpResponse index(io.micronaut.http.HttpRequest<?> request, Authentication authentication)POST endpoint for Logout Controller.- Parameters:
- request- The- HttpRequestbeing executed
- authentication-- Authenticationinstance for current user
- Returns:
- An AccessRefreshToken encapsulated in the HttpResponse or a failure indicated by the HTTP status
 
 - 
indexGet@Get public io.micronaut.http.HttpResponse indexGet(io.micronaut.http.HttpRequest<?> request, Authentication authentication)GET endpoint for Logout Controller.- Parameters:
- request- The- HttpRequestbeing executed
- authentication-- Authenticationinstance for current user
- Returns:
- An AccessRefreshToken encapsulated in the HttpResponse or a failure indicated by the HTTP status
 
 - 
handleLogoutprotected io.micronaut.http.HttpResponse handleLogout(io.micronaut.http.HttpRequest<?> request, Authentication authentication)- Parameters:
- request- The- HttpRequestbeing executed
- authentication-- Authenticationinstance for current user
- Returns:
- An AccessRefreshToken encapsulated in the HttpResponse or a failure indicated by the HTTP status
 
 
- 
 
-