php-opencloud / openstack

PHP SDK for OpenStack clouds
Apache License 2.0
222 stars 152 forks source link

Application credentials #380

Closed k0ka closed 5 months ago

k0ka commented 5 months ago
drzraf commented 5 months ago

Glad this got merged. Still could you consider the comment/commit mentioned at https://github.com/php-opencloud/openstack/pull/336#issuecomment-1004490477

  • application credentials may not request a scope, so the payload sent to /tokens must be modified according to the authentication method
  • Fix an error message regarding the supported authentication methods.
k0ka commented 5 months ago

Hello.

  1. There are a lot of mutually exclusive parameters in /v3/auth/tokens endpoint (https://docs.openstack.org/api-ref/identity/v3/index.html?expanded=authenticating-with-an-application-credential-detail#password-authentication-with-unscoped-authorization), so I guess we should either completely validate parameters or leave it as is. I don't see a reason to only tackle the scope parameter.
  2. Yes, I added mention of application_credential to the error if no required parameters are found - https://github.com/php-opencloud/openstack/pull/380/files#diff-740662dc3353bdc471612b7e58007cf3be1ec5a34663969542b382dc2a5859b1R108