cristipufu / swiftclient-net

.NET Core async HTTP client for OpenStack Swift
MIT License
39 stars 19 forks source link

How to migrate from openstacknet #4

Open ndphuong opened 7 years ago

ndphuong commented 7 years ago

We have plan switch from openstacknet library: What is code similar to this:


CloudIdentityWithProject identity = new CloudIdentityWithProject
            {
                Username = ovhAuthProfile.UserName,
                Password = ovhAuthProfile.Password,
                ProjectId = new ProjectId(ovhAuthProfile.TenantId),
                ProjectName = ovhAuthProfile.TenantId
            };
            identityProvider = new OpenStackIdentityProvider(authUri, identity);
            identityToken = identityProvider.GetToken(identityProvider.DefaultIdentity);
            storageProvider = new CloudFilesProvider(identity, identityProvider);
mabru47 commented 7 years ago

I believe this library can only use the V1.0 authentication. It looks like you need to use V2.0. To use V2.0 you could write your own ISwiftAuthManager.