src/main/java/org/apache/hadoop/hdfs/server/namenode/analytics/web/NamenodeAnalyticsMethods.java
@POST
  @Path("/logout")
  @Produces(MediaType.TEXT_PLAIN)
  public Response logout() {
    final SecurityContext securityContext =
        (SecurityContext) context.getAttribute(NNA_SECURITY_CONTEXT);
    final UsageMetrics usageMetrics = (UsageMetrics) context.getAttribute(NNA_USAGE_METRICS);
    try {
      before();
      securityContext.logout(request, response);
      usageMetrics.userLoggedOut(securityContext, request);
      return Response.ok().build();
    } catch (Exception ex) {
      return handleException(ex);
    } finally {
      after();
    }
  }
/** LOGOUT is used to log out of authenticated web sessions. */
LOGOUT is used to log out of authenticated web sessions.
LOGOUT is used to log out of authenticated web sessions .
@POST
  @Path("/logout")
  @Produces(MediaType.TEXT_PLAIN)
  public Response logout() {
    final SecurityContext securityContext =
        (SecurityContext) context.getAttribute(NNA_SECURITY_CONTEXT);
    final UsageMetrics usageMetrics = (UsageMetrics) context.getAttribute(NNA_USAGE_METRICS);
    try {
      before();
      securityContext.logout(request, response);
      usageMetrics.userLoggedOut(securityContext, request);
      return Response.ok().build();
    } catch (Exception ex) {
      return handleException(ex);
    } finally {
      after();
    }
  }
@ POST @ Path ( "/logout" ) @ Produces ( MediaType . TEXT_PLAIN ) public Response logout ( ) { final SecurityContext securityContext = ( SecurityContext ) context . getAttribute ( NNA_SECURITY_CONTEXT ) ; final UsageMetrics usageMetrics = ( UsageMetrics ) context . getAttribute ( NNA_USAGE_METRICS ) ; try { before ( ) ; securityContext . logout ( request , response ) ; usageMetrics . userLoggedOut ( securityContext , request ) ; return Response . ok ( ) . build ( ) ; } catch ( Exception ex ) { return handleException ( ex ) ; } finally { after ( ) ; } }
LOGOUT is used to log out of authenticated web sessions.
LOGOUT is used to log out of authenticated web sessions .