This patch adds the ability to whitelist and request an audience
when performing any OAuth 2.0 Flow. The audience is useful in multi-
tenant environments where access tokens should be restricted to certain
resources.
Closes#883Closes#1144
Signed-off-by: arekkas <aeneas@ory.am>
Asking for a non-existent client results in the following confusing
error message:
```
Command failed because calling "GET http://hydra:4444/clients/no-such-client" resulted in status code "200" but code "404" was expected.
{"error":"Unable to locate the resource","error_description":"","status_code":404}
```
This commit fixes the expectedStatusCode and response.StatusCode
arguments to fmt.Fprintf which were reversed.
Signed-off-by: Rich Wareham <rich@richwareham.com>
Previously, clients were created despite an error which said that the secret was too short. This patch changes that and improves error output in the CLI as well for this command.
Closes#725