diff --git a/src/main/java/org/opensearch/security/action/onbehalf/CreateOnBehalfOfTokenAction.java b/src/main/java/org/opensearch/security/action/onbehalf/CreateOnBehalfOfTokenAction.java index 2dab1cffa2..ea50dfd0ae 100644 --- a/src/main/java/org/opensearch/security/action/onbehalf/CreateOnBehalfOfTokenAction.java +++ b/src/main/java/org/opensearch/security/action/onbehalf/CreateOnBehalfOfTokenAction.java @@ -31,7 +31,6 @@ import org.opensearch.rest.NamedRoute; import org.opensearch.rest.RestChannel; import org.opensearch.rest.RestRequest; -import org.opensearch.rest.RestRequest.Method; import org.opensearch.core.rest.RestStatus; import org.opensearch.security.authtoken.jwt.JwtVendor; import org.opensearch.security.securityconf.ConfigModel; @@ -46,13 +45,8 @@ public class CreateOnBehalfOfTokenAction extends BaseRestHandler { private static final List routes = addRoutesPrefix( - ImmutableList.of( - new NamedRoute.Builder().method(POST) - .path("/user/onbehalfof") - .uniqueName("security:obo/create") - .build() - ), - "/_plugins/_security/api" + ImmutableList.of(new NamedRoute.Builder().method(POST).path("/user/onbehalfof").uniqueName("security:obo/create").build()), + "/_plugins/_security/api" ); private JwtVendor vendor; @@ -99,7 +93,7 @@ public String getName() { public List routes() { return routes; } - + @Override protected RestChannelConsumer prepareRequest(RestRequest request, NodeClient client) throws IOException { switch (request.method()) {