Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 37ED0200B62 for ; Fri, 12 Aug 2016 12:30:55 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 36731160AB0; Fri, 12 Aug 2016 10:30:55 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A3973160AA6 for ; Fri, 12 Aug 2016 12:30:54 +0200 (CEST) Received: (qmail 46761 invoked by uid 500); 12 Aug 2016 10:30:53 -0000 Mailing-List: contact dev-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list dev@brooklyn.apache.org Received: (qmail 46750 invoked by uid 99); 12 Aug 2016 10:30:53 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Aug 2016 10:30:53 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 802F3E027F; Fri, 12 Aug 2016 10:30:53 +0000 (UTC) From: bostko To: dev@brooklyn.apache.org Reply-To: dev@brooklyn.apache.org References: In-Reply-To: Subject: [GitHub] brooklyn-server pull request #288: BROOKLYN-323: Simplify Logout api Content-Type: text/plain Message-Id: <20160812103053.802F3E027F@git1-us-west.apache.org> Date: Fri, 12 Aug 2016 10:30:53 +0000 (UTC) archived-at: Fri, 12 Aug 2016 10:30:55 -0000 Github user bostko commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/288#discussion_r74571173 --- Diff: rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/LogoutResource.java --- @@ -37,32 +37,45 @@ @Context UriInfo uri; @Override + public Response redirectToLogout() { + URI dest = uri.getBaseUriBuilder().path(LogoutApi.class).build(); + + // Return response with Javascript which will make an asynchronous POST request to the logout method. + // (When calling logout it is important to use wrong username and password in order to make browser forget the old ones) + return Response.status(Status.OK) + .entity(String.format("\n\n" + + "", dest.toASCIIString())) + .build(); --- End diff -- This is needed to reload the whole DOM. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---