return new AuthenticationResponse(response, response.getFirstHeader(Constants.X_AUTH_TOKEN).getValue(),
Collections.singleton(new Region(null,
this.getStorageURL(response), this.getCDNManagementURL(response), true)));
}
else if(response.getStatusLine().getStatusCode() == 401 || response.getStatusLine().getStatusCode() == 403) {
throw new AuthorizationException(new Response(response));
}
else {
throw new GenericException(new Response(response));
}
}