grandchamp / Identity.Dapper

Identity package that uses Dapper instead EntityFramework for use with .NET Core
MIT License
268 stars 62 forks source link

SQL Server - Integrated Security #49

Closed sajeshkumaran closed 6 years ago

sajeshkumaran commented 6 years ago

Thank you for all your work which saved a lot of my time.

It would have been better to have an option to set the SQL database credentials to Integrated windows security. I am not sure if I am asking something wrong since I am pretty new to this Asp.Net Core Api.

Thanks

grandchamp commented 6 years ago

Can't you pass UserName and Password empty and change the connection string? Give a try.

sajeshkumaran commented 6 years ago

Ok. I will try. Thanks

grandchamp commented 6 years ago

It worked?

conankid2512 commented 6 years ago

I have same problem. I don't think it will work with empty username and password since it throw an exception.

https://github.com/grandchamp/Identity.Dapper/blob/master/src/Identity.Dapper.SqlServer/Connections/SqlServerConnectionProvider.cs

if (string.IsNullOrEmpty(_connectionProviderOptions.Value?.ConnectionString))
                throw new ArgumentNullException("There's no DapperIdentity:ConnectionString configured. Please, register the value.");

            if (string.IsNullOrEmpty(_connectionProviderOptions.Value?.Password))
throw new ArgumentNullException("There's no DapperIdentity:Password configured. Please, register the value.");
grandchamp commented 6 years ago

Fixed on https://github.com/grandchamp/Identity.Dapper/commit/b6d77ebe0d4f2f34df71c1b932e7b42aae9d193b

grandchamp commented 6 years ago

@conankid2512 @sajeshkumaran works now?