Example usage for org.apache.solr.security AuthorizationContext getHttpMethod

List of usage examples for org.apache.solr.security AuthorizationContext getHttpMethod

Introduction

In this page you can find the example usage for org.apache.solr.security AuthorizationContext getHttpMethod.

Prototype

public abstract String getHttpMethod();

Source Link

Usage

From source file:org.apache.sentry.binding.solr.authz.SolrAuthzUtil.java

License:Apache License

static String toString(AuthorizationContext ctx) {
    StringBuilder builder = new StringBuilder();
    builder.append("AuthorizationContext {");
    builder.append("userPrincipal : ");
    builder.append(ctx.getUserPrincipal().getName());
    // NOTE - comment out the code until SOLR-10814 is fixed.
    //builder.append(", userName : ");
    //builder.append(ctx.getUserName());
    builder.append(", collections : ");
    builder.append(ctx.getCollectionRequests());
    builder.append(", handler : ");
    builder.append(ctx.getHandler());//from www.j a v a2 s  .  c  o m
    builder.append(", HTTP method : ");
    builder.append(ctx.getHttpMethod());
    builder.append("}");

    return builder.toString();
}