security: rename /authenticate /_authenticate

We use the _ to indicate actions in endpoint names. It appears that the _authenticate API was
incorrectly removed in elastic/elasticsearch#2174. This adds it back.

Original commit: elastic/x-pack-elasticsearch@0a0b85d05a
This commit is contained in:
jaymode 2016-05-26 12:55:28 -04:00
parent 9052a86ad5
commit a58ed3ed32
3 changed files with 5 additions and 5 deletions

View File

@ -34,7 +34,7 @@ public class RestAuthenticateAction extends BaseRestHandler {
public RestAuthenticateAction(Settings settings, RestController controller, Client client, SecurityContext securityContext) {
super(settings, client);
this.securityContext = securityContext;
controller.registerHandler(GET, "/_xpack/security/authenticate", this); // deprecate
controller.registerHandler(GET, "/_xpack/security/_authenticate", this);
}
@Override

View File

@ -47,7 +47,7 @@ public class RestAuthenticateActionTests extends ShieldIntegTestCase {
}
public void testAuthenticateApi() throws Exception {
HttpResponse response = httpClient().method("GET").path("/_xpack/security/authenticate")
HttpResponse response = httpClient().method("GET").path("/_xpack/security/_authenticate")
.addHeader("Authorization", basicAuthHeaderValue(ShieldSettingsSource.DEFAULT_USER_NAME,
new SecuredString(ShieldSettingsSource.DEFAULT_PASSWORD.toCharArray())))
.execute();
@ -61,7 +61,7 @@ public class RestAuthenticateActionTests extends ShieldIntegTestCase {
}
public void testAuthenticateApiWithoutAuthentication() throws Exception {
HttpResponse response = httpClient().method("GET").path("/_xpack/security/authenticate")
HttpResponse response = httpClient().method("GET").path("/_xpack/security/_authenticate")
.execute();
if (anonymousEnabled) {

View File

@ -3,8 +3,8 @@
"documentation": "Retrieve details about the currently authenticated user",
"methods": [ "GET" ],
"url": {
"path": "/_xpack/security/authenticate",
"paths": [ "/_xpack/security/authenticate" ],
"path": "/_xpack/security/_authenticate",
"paths": [ "/_xpack/security/_authenticate" ],
"parts": {},
"params": {}
},