Update login test to use password grant
This commit is contained in:
parent
0673bebbda
commit
24b28fbf94
|
@ -6,3 +6,4 @@ core_version_requirement: ^10
|
|||
dependencies:
|
||||
- farm:asset
|
||||
- log:log
|
||||
- simple_oauth_password_grant:simple_oauth_password_grant
|
||||
|
|
|
@ -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'
|
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue