File tree Expand file tree Collapse file tree 3 files changed +46
-6
lines changed
source/Marten.AspNetCore.Identity Expand file tree Collapse file tree 3 files changed +46
-6
lines changed Original file line number Diff line number Diff line change @@ -46,11 +46,11 @@ jobs:
46
46
- name : Build Release version
47
47
run : dotnet build --no-restore --configuration Release /p:AssemblyVersion=${{ steps.gitversion.outputs.assemblySemFileVer }} /p:FileVersion=${{ steps.gitversion.outputs.assemblySemFileVer }} /p:InformationalVersion=${{ steps.gitversion.outputs.Sha }}
48
48
49
- # - name: Run Tests
50
- # run: dotnet test --configuration Release -- no-restore --verbosity normal --collect:"XPlat Code Coverage" --settings Marten.AspNetCore.Identity.Tests/coverlet.runsettings
49
+ - name : Run Tests
50
+ run : dotnet test --no-restore --configuration Release --verbosity normal --collect:"XPlat Code Coverage" --settings Marten.AspNetCore.Identity.Tests/coverlet.runsettings
51
51
52
52
- name : Pack
53
- run : dotnet pack --no-build --output ./output --configuration Release /p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }}
53
+ run : dotnet pack --no-restore --no-build --configuration Release /p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} --output ./output
54
54
55
55
- name : Upload Package to job as artificat
56
56
uses : actions/upload-artifact@v2
61
61
if-no-files-found : error
62
62
63
63
- name : Upload Package to release
64
- # if: contains(github.ref, 'main')
64
+ if : contains(github.ref, 'main')
65
65
uses : svenstaro/upload-release-action@v1-release
66
66
with :
67
67
repo_token : ${{ secrets.GITHUB_TOKEN }}
72
72
overwrite : true
73
73
74
74
- name : Upload Package to nuget
75
- # if: contains(github.ref, 'main')
75
+ if : contains(github.ref, 'main')
76
76
run : dotnet nuget push ./output/*.nupkg --source $NUGET_FEED --skip-duplicate --api-key ${{ secrets.NUGET_KEY }}
Original file line number Diff line number Diff line change 1
- ![ build] ( https://github.com/soernt/AspNetCore.Identity.Marten/actions/workflows/build_and_test .yml/badge.svg )
1
+ ![ build] ( https://github.com/soernt/AspNetCore.Identity.Marten/actions/workflows/build_test_deploy .yml/badge.svg )
2
2
3
3
# AspNetCore.Identity.Marten
4
4
.Net Core Identity Stores using Marten
5
+
6
+ The users and roles stores are tested by using the offical Microsoft.AspNetCore.Identity.Specification.Tests packages. Have a look at the Marten.AspNetCore.Identity.Tests project.
7
+ To run the tests you should have docker installed. A PostgreSQL image will be automatically downloaded and used during the test.
8
+
9
+
10
+ # How to configure it
11
+
12
+ This repository has a small example project which setup the Microsoft Identity to use this package.
13
+
14
+
15
+ 1 . Add this [ package] ( https://www.nuget.org/packages/Marten.AspNetCore.Identity/ ) to your project.
16
+
17
+ 2 . While adding the default Marten support, you should configure the MartenIdentityUser and MartenIdentityRole entities:
18
+ ``` c#
19
+ builder .Services .AddMarten (options =>
20
+ {
21
+ options .Connection (builder .Configuration .GetConnectionString (" Marten" ));
22
+ // Configure the MartenIdentityUser and MartenIdentityRole mappings
23
+ options .ConfigureMartenIdentityMapping ();
24
+ if (builder .Environment .IsDevelopment ())
25
+ {
26
+ options .AutoCreateSchemaObjects = AutoCreate .All ;
27
+ }
28
+ });
29
+ ```
30
+
31
+ 3 . Add the MartenIdentityStores
32
+ ``` c#
33
+ builder .Services .AddMartenIdentityStores ();
34
+ ```
35
+
36
+ 4 . Configure the default identity to be MartenIdentityUser.
37
+ ``` c#
38
+ builder .Services .AddDefaultIdentity <MartenIdentityUser >();
39
+ ```
Original file line number Diff line number Diff line change 10
10
<Authors >Sörnt Poppe</Authors >
11
11
<PackageTitle >Marten.AspNetCore.Identity</PackageTitle >
12
12
<Description >A Marten UserStore and RoleStore adapter for Microsoft.Extensions.Identity.Core 6.</Description >
13
+ <PackageReadmeFile >README.md</PackageReadmeFile >
13
14
<PackageProjectUrl >http://www.opensource.org/licenses/mit-license.php</PackageProjectUrl >
14
15
<PackageRequireLicenseAcceptance >false</PackageRequireLicenseAcceptance >
15
16
<Copyright >Copyright 2021 (c) Sörnt Poppe. All rights reserved.</Copyright >
21
22
-->
22
23
</PropertyGroup >
23
24
25
+ <ItemGroup >
26
+ <None Include =" ../../README.md" Pack =" true" PackagePath =" \" />
27
+ </ItemGroup >
28
+
24
29
<PropertyGroup >
25
30
<DocumentationFile >bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile >
26
31
</PropertyGroup >
You can’t perform that action at this time.
0 commit comments