Merge branch 'develop' into feature-list-principals

This commit is contained in:
Susmitha Girumala authored and GitHub committed 2020-08-12 17:17:15 -04:00
commit 2cdad00e2c
3 files changed
+6 -6

No files matched your search

+3 -3
View File
@@ -49,19 +49,19 @@ export default class PasswordAuthenticator extends BaseAuthenticator {
*
* @override
* @param {object} creds
* @param {string} creds.identification is sent to server as `name`
* @param {string} creds.identification is sent to server as `login_name`
* @param {string} creds.password
* @param {boolean} requestCookies request cookie tokens (default `true`)
* @return {Promise}
*/
async authenticate(
{ identification: name, password },
{ identification: login_name, password },
requestCookies = true,
options
) {
const body = JSON.stringify({
token_type: requestCookies ? 'cookie' : null,
credentials: { name, password },
credentials: { login_name, password },
});
const authEndpointURL = this.buildAuthEndpointURL(options);
const response = await fetch(authEndpointURL, { method: 'post', body });
@@ -41,7 +41,7 @@ module('Unit | Authenticator | password', function (hooks) {
assert.deepEqual(json, {
token_type: 'cookie',
credentials: {
name: 'foo',
login_name: 'foo',
password: 'bar',
},
});