Update login test to use password grant

This commit is contained in:
Paul Weidner 2023-10-30 15:58:41 -07:00 committed by Michael Stenta
parent 0673bebbda
commit 24b28fbf94
3 changed files with 27 additions and 0 deletions

View File

@ -6,3 +6,4 @@ core_version_requirement: ^10
dependencies:
- farm:asset
- log:log
- simple_oauth_password_grant:simple_oauth_password_grant

View File

@ -0,0 +1,12 @@
test:password:
description: 'Static scope for password grant.'
umbrella: false
grant_types:
authorization_code:
status: true
description: 'Authorization code grant.'
password:
status: true
description: 'Password grant'
granularity: 'permission'
permission: 'access content'

View File

@ -27,9 +27,23 @@ class OauthPasswordTest extends OauthTestBase {
'text',
'user',
'farm_api_default_consumer',
'farm_api_test',
'farm_login',
];
/**
* {@inheritdoc}
*/
protected function setUp(): void {
parent::setUp();
// Add support for password grant and password scope consumer.
$this->client->get('grant_types')->appendItem('password');
$this->client->set('scopes', ['test:password']);
$this->client->save();
$this->scope = 'test:password';
}
/**
* Test a valid Password grant using username and email.
*/