Skip to content

Commit

Permalink
Correctly implement the POST credentials method
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Sven Wiltink authored and svenwiltink committed Jul 5, 2022
1 parent 42e2d09 commit 74352e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Identity/v3/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@ public function postCredentials(): array
return [
'method' => 'POST',
'path' => 'credentials',
'jsonKey' => 'credential',
'params' => [
'blob' => $this->params->blob(),
'projectId' => $this->params->projectId(),
Expand Down
2 changes: 2 additions & 0 deletions src/Identity/v3/Models/Credential.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class Credential extends OperatorResource implements Creatable, Updateable, Retr
'user_id' => 'userId',
];

protected $resourceKey = 'credential';

/**
* {@inheritdoc}
*/
Expand Down

0 comments on commit 74352e5

Please sign in to comment.