diff --git a/addons/auth/addon/authenticators/password.js b/addons/auth/addon/authenticators/password.js index 3e0eb53e4..0f5da7826 100644 --- a/addons/auth/addon/authenticators/password.js +++ b/addons/auth/addon/authenticators/password.js @@ -57,7 +57,7 @@ export default class PasswordAuthenticator extends BaseAuthenticator { ) { const body = JSON.stringify({ command: 'login', - token_type: requestCookies ? 'cookie' : null, + type: requestCookies ? 'cookie' : null, attributes: { login_name, password }, }); const authEndpointURL = this.buildAuthEndpointURL(options); diff --git a/addons/auth/tests/unit/authenticators/password-test.js b/addons/auth/tests/unit/authenticators/password-test.js index 9799101e7..ac036d9ab 100644 --- a/addons/auth/tests/unit/authenticators/password-test.js +++ b/addons/auth/tests/unit/authenticators/password-test.js @@ -14,7 +14,7 @@ module('Unit | Authenticator | password', function (hooks) { authenticator.buildAuthEndpointURL(), (schema, request) => { const json = JSON.parse(request.requestBody); - assert.ok(json.token_type, 'Requested token cookies by default'); + assert.ok(json.type, 'Requested token cookies by default'); return new Response(200); } ); @@ -30,7 +30,7 @@ module('Unit | Authenticator | password', function (hooks) { authenticator.buildAuthEndpointURL(), (schema, request) => { const json = JSON.parse(request.requestBody); - assert.notOk(json.token_type, 'Did not request tokens cookies'); + assert.notOk(json.type, 'Did not request tokens cookies'); return new Response(200); } ); @@ -48,7 +48,7 @@ module('Unit | Authenticator | password', function (hooks) { const json = JSON.parse(request.requestBody); assert.deepEqual(json, { command: 'login', - token_type: 'cookie', + type: 'cookie', attributes: { login_name: 'foo', password: 'bar',