active-directory-aspnetcore-webapp-openidconnect-v2 icon indicating copy to clipboard operation
active-directory-aspnetcore-webapp-openidconnect-v2 copied to clipboard

Use own database context, for example with SQLite

Open IxelBox opened this issue 6 years ago • 4 comments

Purpose

I will use only one database context for all in my application and so I have wrote this change. The main change for developer is first initialize of database context and then initialize azure auth.

Does this introduce a breaking change?

[x] Yes
[ ] No

Pull Request Type

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
[change settings in appsettings.json]
dotnet run
  • Test the code

IxelBox avatar Jul 25 '19 11:07 IxelBox

CLA assistant check
All CLA requirements met.

msftclas avatar Jul 25 '19 11:07 msftclas

@jmprieur I am assigning you to review this PR and make a decision. I can see that this architecture is more likely the industry standards, however it brings code that is not the purpose of this sample. On the other hand, we are preparing the extensions project to be a nuget package and the SqlCache provider shouldn`t define what DB tool to use.

@IxelBox thanks for the collaboration. We will analyze it soon.

TiagoBrenck avatar Aug 13 '19 17:08 TiagoBrenck

@IxelBox : thanks for much for this contribution @TiagoBrenck : I like the idea.

We probably want to understand if an implementation of IDistributedCache for SQL lite would be better? (See https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/pull/173)

jmprieur avatar Sep 03 '19 13:09 jmprieur

@TiagoBrenck : the question is could we or @IxelBox provide an implementation of IDistributedCache for SQLLite. See Distributed caching in ASP.NET Core

Then Microsoft.Identity.Web (but not only) would immediately benefit from it as described in Token cache serialization

jmprieur avatar Feb 06 '20 20:02 jmprieur

@v-michaelmi , review and approve or reject

kalyankrishna1 avatar Nov 29 '22 22:11 kalyankrishna1