title: Openstack authorization
body: <p>Hello to everyone reading this,</p>
  
  <p>I want to list all images from openstack with the following code in C#:</p>
  
  <pre><code>using System;
  using Microsoft.VisualStudio.TestTools.UnitTesting;
  using net.openstack.Providers.Rackspace;
  using net.openstack.Core.Domain;
  using net.openstack.Core.Providers;
  namespace RepositoriesTests
  {
      [TestClass]
      public class RackspaceTests
      {
          public string username = "mbar";
          public string password = "password";
          public string url = "http://192.168.5.55:5001/v3";
          public string project_id = "a9b2b59f093f44d881b8ebccbba00901";
          public string project_name = "test-nsix";
      [TestMethod]
      public void TestConnection()
      {
          try
          {
              var identity = new CloudIdentityWithProject()
              {
                  Username = username,
                  Password = password,
                  ProjectId = new ProjectId(project_id),
                  ProjectName = project_name
              };
              var identityProvider = new OpenStackIdentityProvider(new Uri(url));
  
  
              var serverProvider = new CloudServersProvider(identity, identityProvider);
  
              var images = serverProvider.ListImages(region: "RegionOne");
          }catch(Exception ex)
          {
              Assert.Fail(ex.Message);
          }
      }
  
  }
  }
  </code></pre>
  
  <p>When I run this example I receive the following error: <strong>The request you have made requires authentication.</strong>
  I checked in the browser window what I get from url: <a href="http://192.168.5.55:5001/v3" rel="nofollow">http://192.168.5.55:5001/v3</a> and I see that server exists: </p>
  
  <pre><code>{"version": {"status": "stable", "updated": "2016-04-04T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.6", "links": [{"href": "http://192.168.5.55:5001/v3/", "rel": "self"}]}}
  </code></pre>
  
  <p>I'm not sure where the problem lies and why I can not authorize.</p>
  
  <p>This is stacktrace:</p>
  
  <pre><code>   w net.openstack.Providers.Rackspace.Validators.HttpResponseCodeValidator.Validate(Response response) w C:\Bamboo\xml-data\build-dir\OSTK-NET19-BLD\src\corelib\Providers\Rackspace\Validators\HttpResponseCodeValidator.cs:wiersz 48
     w net.openstack.Providers.Rackspace.ProviderBase`1.CheckResponse(Response response) w C:\Bamboo\xml-data\build-dir\OSTK-NET19-BLD\src\corelib\Providers\Rackspace\ProviderBase`1.cs:wiersz 861
     w net.openstack.Providers.Rackspace.ProviderBase`1.ExecuteRESTRequest[T](CloudIdentity identity, Uri absoluteUri, HttpMethod method, Object body, Dictionary`2 queryStringParameter, Dictionary`2 headers, Boolean isRetry, Boolean isTokenRequest, RequestSettings requestSettings, Func`7 callback) w C:\Bamboo\xml-data\build-dir\OSTK-NET19-BLD\src\corelib\Providers\Rackspace\ProviderBase`1.cs:wiersz 505
     w net.openstack.Providers.Rackspace.ProviderBase`1.ExecuteRESTRequest[T](CloudIdentity identity, Uri absoluteUri, HttpMethod method, Object body, Dictionary`2 queryStringParameter, Dictionary`2 headers, Boolean isRetry, Boolean isTokenRequest, RequestSettings settings) w C:\Bamboo\xml-data\build-dir\OSTK-NET19-BLD\src\corelib\Providers\Rackspace\ProviderBase`1.cs:wiersz 294
     w net.openstack.Core.Providers.OpenStackIdentityProvider.&lt;&gt;c__DisplayClass4_0.&lt;GetUserAccess&gt;b__0() w C:\Bamboo\xml-data\build-dir\OSTK-NET19-BLD\src\corelib\Core\Providers\OpenStackIdentityProvider.cs:wiersz 108
     w net.openstack.Core.Caching.UserAccessCache.&lt;&gt;c__DisplayClass2_0.&lt;Get&gt;b__0(String k) w C:\Bamboo\xml-data\build-dir\OSTK-NET19-BLD\src\corelib\Core\Caching\UserAccessCache.cs:wiersz 58
     w System.Collections.Concurrent.ConcurrentDictionary`2.AddOrUpdate(TKey key, Func`2 addValueFactory, Func`3 updateValueFactory)
     w net.openstack.Core.Caching.UserAccessCache.Get(String key, Func`1 refreshCallback, Boolean forceCacheRefresh) w C:\Bamboo\xml-data\build-dir\OSTK-NET19-BLD\src\corelib\Core\Caching\UserAccessCache.cs:wiersz 58
     w net.openstack.Core.Providers.OpenStackIdentityProvider.GetUserAccess(CloudIdentity identity, Boolean forceCacheRefresh) w C:\Bamboo\xml-data\build-dir\OSTK-NET19-BLD\src\corelib\Core\Providers\OpenStackIdentityProvider.cs:wiersz 123
     w net.openstack.Providers.Rackspace.CloudIdentityProvider.Authenticate(CloudIdentity identity) w C:\Bamboo\xml-data\build-dir\OSTK-NET19-BLD\src\corelib\Providers\Rackspace\CloudIdentityProvider.cs:wiersz 948
     w RepositoriesTests.RackspaceTests.TestConnection() w D:\Projekty\NSIX\RepositoriesTests\RackspaceTests.cs:wiersz 35
  </code></pre>