Skip to content

Commit

Permalink
Avoid using deprecated camelCase parameters for SAML APIs. (#103091)
Browse files Browse the repository at this point in the history
  • Loading branch information
azasypkin authored Jun 24, 2021
1 parent 7e32f93 commit dd20b8a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,7 @@ describe('SAMLAuthenticationProvider', () => {
expect(mockOptions.client.asInternalUser.transport.request).toHaveBeenCalledWith({
method: 'POST',
path: '/_security/saml/invalidate',
body: { queryString: 'SAMLRequest=xxx%20yyy', realm: 'test-realm' },
body: { query_string: 'SAMLRequest=xxx%20yyy', realm: 'test-realm' },
});
});

Expand Down Expand Up @@ -1286,7 +1286,7 @@ describe('SAMLAuthenticationProvider', () => {
expect(mockOptions.client.asInternalUser.transport.request).toHaveBeenCalledWith({
method: 'POST',
path: '/_security/saml/invalidate',
body: { queryString: 'SAMLRequest=xxx%20yyy', realm: 'test-realm' },
body: { query_string: 'SAMLRequest=xxx%20yyy', realm: 'test-realm' },
});
});

Expand All @@ -1305,7 +1305,7 @@ describe('SAMLAuthenticationProvider', () => {
expect(mockOptions.client.asInternalUser.transport.request).toHaveBeenCalledWith({
method: 'POST',
path: '/_security/saml/invalidate',
body: { queryString: 'SAMLRequest=xxx%20yyy', realm: 'test-realm' },
body: { query_string: 'SAMLRequest=xxx%20yyy', realm: 'test-realm' },
});
});

Expand All @@ -1324,7 +1324,7 @@ describe('SAMLAuthenticationProvider', () => {
expect(mockOptions.client.asInternalUser.transport.request).toHaveBeenCalledWith({
method: 'POST',
path: '/_security/saml/invalidate',
body: { queryString: 'SAMLRequest=xxx%20yyy', realm: 'test-realm' },
body: { query_string: 'SAMLRequest=xxx%20yyy', realm: 'test-realm' },
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -624,9 +624,9 @@ export class SAMLAuthenticationProvider extends BaseAuthenticationProvider {
await this.options.client.asInternalUser.transport.request({
method: 'POST',
path: '/_security/saml/invalidate',
// Elasticsearch expects `queryString` without leading `?`, so we should strip it with `slice`.
// Elasticsearch expects `query_string` without leading `?`, so we should strip it with `slice`.
body: {
queryString: request.url.search ? request.url.search.slice(1) : '',
query_string: request.url.search ? request.url.search.slice(1) : '',
realm: this.realm,
},
})
Expand Down

0 comments on commit dd20b8a

Please sign in to comment.