src/main/java/org/apache/hadoop/hdfs/server/namenode/analytics/web/NamenodeAnalyticsMethods.java
@POST
  @Path("/login")
  @Produces(MediaType.TEXT_PLAIN)
  @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
  public Response login(MultivaluedMap<String, String> formData) {
    try {
      before();
      final SecurityContext securityContext =
          (SecurityContext) context.getAttribute(NNA_SECURITY_CONTEXT);
      final UsageMetrics usageMetrics = (UsageMetrics) context.getAttribute(NNA_USAGE_METRICS);
      securityContext.login(request, response, formData);
      usageMetrics.userLoggedIn(securityContext, request);
      return Response.ok().build();
    } catch (Exception ex) {
      return handleException(ex);
    } finally {
      after();
    }
  }
/** LOGIN is used to log into authenticated web sessions. */
LOGIN is used to log into authenticated web sessions.
LOGIN is used to log into authenticated web sessions .
@POST
  @Path("/login")
  @Produces(MediaType.TEXT_PLAIN)
  @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
  public Response login(MultivaluedMap<String, String> formData) {
    try {
      before();
      final SecurityContext securityContext =
          (SecurityContext) context.getAttribute(NNA_SECURITY_CONTEXT);
      final UsageMetrics usageMetrics = (UsageMetrics) context.getAttribute(NNA_USAGE_METRICS);
      securityContext.login(request, response, formData);
      usageMetrics.userLoggedIn(securityContext, request);
      return Response.ok().build();
    } catch (Exception ex) {
      return handleException(ex);
    } finally {
      after();
    }
  }
@ POST @ Path ( "/login" ) @ Produces ( MediaType . TEXT_PLAIN ) @ Consumes ( MediaType . APPLICATION_FORM_URLENCODED ) public Response login ( MultivaluedMap < String , String > formData ) { try { before ( ) ; final SecurityContext securityContext = ( SecurityContext ) context . getAttribute ( NNA_SECURITY_CONTEXT ) ; final UsageMetrics usageMetrics = ( UsageMetrics ) context . getAttribute ( NNA_USAGE_METRICS ) ; securityContext . login ( request , response , formData ) ; usageMetrics . userLoggedIn ( securityContext , request ) ; return Response . ok ( ) . build ( ) ; } catch ( Exception ex ) { return handleException ( ex ) ; } finally { after ( ) ; } }
LOGIN is used to log into authenticated web sessions.
LOGIN is used to log into authenticated web sessions .