Skip to content

Commit bc27589

Browse files
author
BigPandaToo
committed
Nit fixes and formatting following elastic#62490 comments
Resolves: elastic#63792
1 parent e17c289 commit bc27589

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

x-pack/docs/en/rest-api/security/get-tokens.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ seconds) that the token expires in, and the type:
138138
"type" : "file"
139139
},
140140
"lookup_realm" : {
141-
"name" : "file",
142-
"type" : "file"
141+
"name" : "file",
142+
"type" : "file"
143143
},
144144
"authentication_type" : "realm"
145145
}

x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/authc/TokenAuthIntegTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public void testTokenServiceCanRotateKeys() throws Exception {
135135
assertNotEquals(activeKeyHash, tokenService.getActiveKeyHash());
136136
}
137137
assertNotNull(response.getAuthentication());
138-
assertEquals(response.getAuthentication().getUser().getUsername(), SecuritySettingsSource.TEST_USER_NAME);
138+
assertEquals(SecuritySettingsSource.TEST_USER_NAME, response.getAuthentication().getUser().getUsername());
139139
}
140140

141141
public void testExpiredTokensDeletedAfterExpiration() throws Exception {

x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/authc/pki/PkiAuthDelegationIntegTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ public void testDelegateThenAuthenticate() throws Exception {
150150
String token = delegatePkiResponse.getAccessToken();
151151
assertThat(token, is(notNullValue()));
152152
assertNotNull(delegatePkiResponse.getAuthentication());
153+
assertEquals("Elasticsearch Test Client", delegatePkiResponse.getAuthentication().getUser().getUsername());
153154

154155
// authenticate
155156
optionsBuilder = RequestOptions.DEFAULT.toBuilder();

x-pack/qa/oidc-op-tests/src/test/java/org/elasticsearch/xpack/security/authc/oidc/OpenIdConnectAuthIT.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ private Tuple<String, String> completeAuthentication(String redirectUri, String
421421
assertNotNull(responseBody.get("access_token"));
422422
assertNotNull(responseBody.get("refresh_token"));
423423
assertNotNull(responseBody.get("authentication"));
424+
assertEquals("facilitator", ((Map)responseBody.get("authentication")).get("username"));
424425
return Tuple.tuple(responseBody.get("access_token").toString(), responseBody.get("refresh_token").toString());
425426
}
426427
}

x-pack/qa/saml-idp-tests/src/test/java/org/elasticsearch/xpack/security/authc/saml/SamlAuthenticationIT.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ private Tuple<String, String> loginViaSaml(String realmName) throws Exception {
207207
final Object authentication = result.get("authentication");
208208
assertThat(authentication, notNullValue());
209209
assertThat(authentication, instanceOf(Map.class));
210+
assertEquals("thor", ((Map)authentication).get("username"));
210211

211212
return new Tuple<>((String) accessToken, (String) refreshToken);
212213
}

0 commit comments

Comments
 (0)