This changes so that we don't return before even checking
if the request failed by checking the response code like
was done for other methods in [1].
[1] https://github.com/ceph/ceph/pull/53846
Signed-off-by: Tobias Urdin <tobias.urdin@binero.se>
token_req.set_url(token_url);
const int ret = token_req.process(y);
- if (ret < 0) {
- return ret;
- }
/* Detect rejection earlier than during the token parsing step. */
if (token_req.get_http_status() ==
return -EACCES;
}
+ // throw any other http or connection errors
+ if (ret < 0) {
+ return ret;
+ }
+
if (t.parse(dpp, token_req.get_subject_token(), token_bl,
keystone_version) != 0) {
return -EINVAL;