Skip to content

Commit 74352e5

Browse files
Sven Wiltinksvenwiltink
authored andcommitted
Correctly implement the POST credentials method
https://docs.openstack.org/api-ref/identity/v3/index.html?expanded=authenticating-with-an-application-credential-detail,create-credential-detail#credentials specifies that the credentials endpoint expects a credential object and returns one. This patch ensures the data is properly encoded and decoded.
1 parent 42e2d09 commit 74352e5

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/Identity/v3/Api.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,7 @@ public function postCredentials(): array
691691
return [
692692
'method' => 'POST',
693693
'path' => 'credentials',
694+
'jsonKey' => 'credential',
694695
'params' => [
695696
'blob' => $this->params->blob(),
696697
'projectId' => $this->params->projectId(),

src/Identity/v3/Models/Credential.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ class Credential extends OperatorResource implements Creatable, Updateable, Retr
3939
'user_id' => 'userId',
4040
];
4141

42+
protected $resourceKey = 'credential';
43+
4244
/**
4345
* {@inheritdoc}
4446
*/

0 commit comments

Comments
 (0)