@Unauthenticated
    @Timed
    @Override
    public Boolean logout(final String postLogoutRedirectUri) {
        LOGGER.debug("Received a logout request");
        final AuthenticateEventAction.Builder<Void> eventBuilder = AuthenticateEventAction.builder()
                .withLogonType(AuthenticateLogonType.INTERACTIVE)
                .withAction(AuthenticateAction.LOGOFF);

        try {
            final HttpServletRequest request = httpServletRequestHolderProvider.get().get();
            final String userId = serviceProvider.get().logout(request);
            eventBuilder.withUser(User.builder().withId(userId).build())
                    .withAuthenticationEntity(User.builder()
                            .withId(userId)
                            .build());

        } catch (Throwable e) {
            eventBuilder.withOutcome(AuthenticateOutcome.builder()
                    .withSuccess(false)
                    .withReason(AuthenticateOutcomeReason.OTHER)
                    .withDescription(e.getMessage())
                    .withData(Data.builder()
                            .withName("Error")
                            .withValue(e.getMessage())
                            .build())
                    .build());
        }

        try {
            UriBuilder uriBuilder = UriBuilder.fromUri(postLogoutRedirectUri);
            throw new RedirectionException(Status.TEMPORARY_REDIRECT, uriBuilder.build());
        } finally {
            stroomEventLoggingServiceProvider.get().log(
                    "AuthenticationResourceImpl.Logout",
                    "Stroom user logout",
                    eventBuilder.build());
        }
    }
Called as part of logout flow when using internal identity provider.
stroom-security/stroom-security-identity/src/main/java/stroom/security/identity/authenticate/AuthenticationResourceImpl.java