Skip to content

Commit 75dc88e

Browse files
authored
Merge pull request #5 from codez-one/add_all_providers
Add all providers
2 parents 261a35d + 3d9ee19 commit 75dc88e

File tree

95 files changed

+702
-250
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+702
-250
lines changed

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"type": "coreclr",
1010
"request": "launch",
1111
"preLaunchTask": "build",
12-
"program": "${workspaceFolder}/samples/KK.AspNetCore.EasyAuthAuthentication.Samples.Web/bin/Debug/netcoreapp3.1/KK.AspNetCore.EasyAuthAuthentication.Samples.Web.dll",
12+
"program": "${workspaceFolder}/samples/CZ.AspNetCore.EasyAuthAuthentication.Samples.Web/bin/Debug/netcoreapp3.1/CZ.AspNetCore.EasyAuthAuthentication.Samples.Web.dll",
1313
"args": [],
14-
"cwd": "${workspaceFolder}/samples/KK.AspNetCore.EasyAuthAuthentication.Samples.Web",
14+
"cwd": "${workspaceFolder}/samples/CZ.AspNetCore.EasyAuthAuthentication.Samples.Web",
1515
"stopAtEntry": false,
1616
"internalConsoleOptions": "openOnSessionStart",
1717
"launchBrowser": {

.vscode/tasks.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"type": "process",
1010
"args": [
1111
"build",
12-
"${workspaceFolder}/samples/KK.AspNetCore.EasyAuthAuthentication.Samples.Web/KK.AspNetCore.EasyAuthAuthentication.Samples.Web.csproj"
12+
"${workspaceFolder}/samples/CZ.AspNetCore.EasyAuthAuthentication.Samples.Web/CZ.AspNetCore.EasyAuthAuthentication.Samples.Web.csproj"
1313
],
1414
"problemMatcher": "$msCompile",
1515
"group": {
@@ -26,7 +26,7 @@
2626
"env": {
2727
"ASPNETCORE_ENVIRONMENT": "Production"
2828
},
29-
"cwd": "${workspaceFolder}/src/KK.AspNetCore.EasyAuthAuthentication.Samples.Web"
29+
"cwd": "${workspaceFolder}/src/CZ.AspNetCore.EasyAuthAuthentication.Samples.Web"
3030
},
3131
"problemMatcher": []
3232
}

KK.AspNetCore.EasyAuthAuthentication.code-workspace renamed to CZ.AspNetCore.EasyAuthAuthentication.code-workspace

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@
33
"folders": [
44
{
55
"name": "EasyAuth Middleware",
6-
"path": "./src/KK.AspNetCore.EasyAuthAuthentication"
6+
"path": "./src/CZ.AspNetCore.EasyAuthAuthentication"
7+
},
8+
{
9+
"name": "Tests",
10+
"path": "./test/CZ.AspNetCore.EasyAuthAuthentication.Test"
711
},
812
{
913
"name": "EasyAuth Middleware Sample Web",
10-
"path": "./samples/KK.AspNetCore.EasyAuthAuthentication.Samples.Web"
14+
"path": "./samples/CZ.AspNetCore.EasyAuthAuthentication.Samples.Web"
1115
},
1216
{
1317
"name": "EasyAuth Middleware Sample Client",
14-
"path": "./samples/KK.AspNetCore.EasyAuthAuthentication.Samples.Client"
18+
"path": "./samples/CZ.AspNetCore.EasyAuthAuthentication.Samples.Client"
1519
},
1620
{
1721
"name": "Vscode Build Debug",
@@ -26,5 +30,9 @@
2630
"path": "./"
2731
}
2832
],
29-
"settings": {}
33+
"settings": {
34+
"cSpell.words": [
35+
"authentification"
36+
]
37+
}
3038
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ VisualStudioVersion = 16.0.29021.104
44
MinimumVisualStudioVersion = 15.0.26124.0
55
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{5D09A785-6509-4FA8-8394-DB761ECFC353}"
66
EndProject
7-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KK.AspNetCore.EasyAuthAuthentication", "src\KK.AspNetCore.EasyAuthAuthentication\KK.AspNetCore.EasyAuthAuthentication.csproj", "{70FFE5C2-8F7C-49E0-9C31-DB713BA66B8B}"
7+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CZ.AspNetCore.EasyAuthAuthentication", "src\CZ.AspNetCore.EasyAuthAuthentication\CZ.AspNetCore.EasyAuthAuthentication.csproj", "{70FFE5C2-8F7C-49E0-9C31-DB713BA66B8B}"
88
EndProject
99
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{215B89CF-8087-48EF-ACDE-995AEE744BF2}"
1010
ProjectSection(SolutionItems) = preProject
@@ -17,18 +17,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1717
EndProject
1818
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{61A3BCF5-B88D-4B1A-B75B-0FAAAD64B5EE}"
1919
EndProject
20-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KK.AspNetCore.EasyAuthAuthentication.Test", "test\KK.AspNetCore.EasyAuthAuthentication.Test\KK.AspNetCore.EasyAuthAuthentication.Test.csproj", "{14E614F4-F9AD-4366-8655-25BA022DF2F9}"
20+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CZ.AspNetCore.EasyAuthAuthentication.Test", "test\CZ.AspNetCore.EasyAuthAuthentication.Test\CZ.AspNetCore.EasyAuthAuthentication.Test.csproj", "{14E614F4-F9AD-4366-8655-25BA022DF2F9}"
2121
EndProject
2222
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{D2C7C51D-6374-45F1-9720-BD2AB72A5985}"
2323
ProjectSection(SolutionItems) = preProject
24-
build\KK.AspNetCore.EasyAuthAuthentication.yaml = build\KK.AspNetCore.EasyAuthAuthentication.yaml
24+
build\CZ.AspNetCore.EasyAuthAuthentication.yaml = build\CZ.AspNetCore.EasyAuthAuthentication.yaml
2525
EndProjectSection
2626
EndProject
2727
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{5BFA66A2-D17F-4D6B-B42C-31A47EAB6995}"
2828
EndProject
29-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KK.AspNetCore.EasyAuthAuthentication.Samples.Client", "samples\KK.AspNetCore.EasyAuthAuthentication.Samples.Client\KK.AspNetCore.EasyAuthAuthentication.Samples.Client.csproj", "{ABE0D857-5552-4A77-9BB3-0386B9A06DD7}"
29+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CZ.AspNetCore.EasyAuthAuthentication.Samples.Client", "samples\CZ.AspNetCore.EasyAuthAuthentication.Samples.Client\CZ.AspNetCore.EasyAuthAuthentication.Samples.Client.csproj", "{ABE0D857-5552-4A77-9BB3-0386B9A06DD7}"
3030
EndProject
31-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KK.AspNetCore.EasyAuthAuthentication.Samples.Web", "samples\KK.AspNetCore.EasyAuthAuthentication.Samples.Web\KK.AspNetCore.EasyAuthAuthentication.Samples.Web.csproj", "{ECDD0707-BC69-424F-AA74-CE062A7988D1}"
31+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CZ.AspNetCore.EasyAuthAuthentication.Samples.Web", "samples\CZ.AspNetCore.EasyAuthAuthentication.Samples.Web\CZ.AspNetCore.EasyAuthAuthentication.Samples.Web.csproj", "{ECDD0707-BC69-424F-AA74-CE062A7988D1}"
3232
EndProject
3333
Global
3434
GlobalSection(SolutionConfigurationPlatforms) = preSolution

README.md

Lines changed: 52 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# KK.AspNetCore.EasyAuthAuthentication
1+
# CZ.AspNetCore.EasyAuthAuthentication
22

33
This helps getting azure appservice authentication working with asp.net core.
44

@@ -8,30 +8,30 @@ The EasyAuth handler is provided as a nuget package and can be found on nuget.or
88

99
| Name | Status |
1010
| ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11-
| KK.AspNetCore.EasyAuthAuthentication | [![Nuget Badge](https://img.shields.io/nuget/v/KK.AspNetCore.EasyAuthAuthentication.svg)](https://www.nuget.org/packages/KK.AspNetCore.EasyAuthAuthentication/) |
11+
| CZ.AspNetCore.EasyAuthAuthentication | [![Nuget Badge](https://img.shields.io/nuget/v/CZ.AspNetCore.EasyAuthAuthentication.svg)](https://www.nuget.org/packages/CZ.AspNetCore.EasyAuthAuthentication/) |
1212

1313
You can add the package for example with the following `dotnet` command:
1414

1515
```bash
16-
dotnet add package KK.AspNetCore.EasyAuthAuthentication
16+
dotnet add package CZ.AspNetCore.EasyAuthAuthentication
1717
```
1818

19-
Pre-releases of this Package are pushed to an internal <a href="https://dev.azure.com/kirkone/KK.AspNetCore.EasyAuthAuthentication/_packaging?_a=feed&feed=KK.AspNetCore.EasyAuthAuthentication" target="_blank">feed an Azure DevOps</a>.
19+
Pre-releases of this Package are pushed to an internal <a href="https://dev.azure.com/kirkone/CZ.AspNetCore.EasyAuthAuthentication/_packaging?_a=feed&feed=CZ.AspNetCore.EasyAuthAuthentication" target="_blank">feed an Azure DevOps</a>.
2020

21-
There are also access to packages from pull requests in another <a href="https://dev.azure.com/kirkone/KK.AspNetCore.EasyAuthAuthentication/_packaging?_a=feed&feed=KK.AspNetCore.EasyAuthAuthentication-PR" target="_blank">Azure DevOps feed</a>. All Packages in this feed has a name like this: `PR-{pull request number}-KK.AspNetCore.EasyAuthAuthentication`. So you must only pick the package of your PR to check your changes in a test project. All changes of the pull request are tracked in the pull request package version history.
21+
There are also access to packages from pull requests in another <a href="https://dev.azure.com/kirkone/CZ.AspNetCore.EasyAuthAuthentication/_packaging?_a=feed&feed=CZ.AspNetCore.EasyAuthAuthentication-PR" target="_blank">Azure DevOps feed</a>. All Packages in this feed has a name like this: `PR-{pull request number}-CZ.AspNetCore.EasyAuthAuthentication`. So you must only pick the package of your PR to check your changes in a test project. All changes of the pull request are tracked in the pull request package version history.
2222

2323
## Build
2424

25-
The build environment for this project is on Azure DevOps and can be found here [dev.azure.com/kirkone/KK.AspNetCore.EasyAuthAuthentication](https://dev.azure.com/kirkone/KK.AspNetCore.EasyAuthAuthentication/_build).
25+
The build environment for this project is on Azure DevOps and can be found here [dev.azure.com/kirkone/CZ.AspNetCore.EasyAuthAuthentication](https://dev.azure.com/kirkone/CZ.AspNetCore.EasyAuthAuthentication/_build).
2626

2727
### Nuget package build
2828

2929
| Name | Status |
3030
| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
31-
| KK.AspNetCore.EasyAuthAuthentication-CI | [![Build Status](https://dev.azure.com/kirkone/KK.AspNetCore.EasyAuthAuthentication/_apis/build/status/KK.AspNetCore.EasyAuthAuthentication-CI)](https://dev.azure.com/kirkone/KK.AspNetCore.EasyAuthAuthentication/_build/latest?definitionId=24) |
32-
| Alpha | [![Alpha](https://vsrm.dev.azure.com/kirkone/_apis/public/Release/badge/b206bf59-b281-4d06-91c3-3877c3aeaaf9/1/1)](https://dev.azure.com/kirkone/KK.AspNetCore.EasyAuthAuthentication/_releases2?definitionId=1&_a=releases) |
33-
| Beta | [![Beta](https://vsrm.dev.azure.com/kirkone/_apis/public/Release/badge/b206bf59-b281-4d06-91c3-3877c3aeaaf9/1/2)](https://dev.azure.com/kirkone/KK.AspNetCore.EasyAuthAuthentication/_releases2?definitionId=1&_a=releases) |
34-
| Release | [![Release](https://vsrm.dev.azure.com/kirkone/_apis/public/Release/badge/b206bf59-b281-4d06-91c3-3877c3aeaaf9/1/3)](https://dev.azure.com/kirkone/KK.AspNetCore.EasyAuthAuthentication/_releases2?definitionId=1&_a=releases) |
31+
| CZ.AspNetCore.EasyAuthAuthentication-CI | [![Build Status](https://dev.azure.com/kirkone/CZ.AspNetCore.EasyAuthAuthentication/_apis/build/status/CZ.AspNetCore.EasyAuthAuthentication-CI)](https://dev.azure.com/kirkone/CZ.AspNetCore.EasyAuthAuthentication/_build/latest?definitionId=24) |
32+
| Alpha | [![Alpha](https://vsrm.dev.azure.com/kirkone/_apis/public/Release/badge/b206bf59-b281-4d06-91c3-3877c3aeaaf9/1/1)](https://dev.azure.com/kirkone/CZ.AspNetCore.EasyAuthAuthentication/_releases2?definitionId=1&_a=releases) |
33+
| Beta | [![Beta](https://vsrm.dev.azure.com/kirkone/_apis/public/Release/badge/b206bf59-b281-4d06-91c3-3877c3aeaaf9/1/2)](https://dev.azure.com/kirkone/CZ.AspNetCore.EasyAuthAuthentication/_releases2?definitionId=1&_a=releases) |
34+
| Release | [![Release](https://vsrm.dev.azure.com/kirkone/_apis/public/Release/badge/b206bf59-b281-4d06-91c3-3877c3aeaaf9/1/3)](https://dev.azure.com/kirkone/CZ.AspNetCore.EasyAuthAuthentication/_releases2?definitionId=1&_a=releases) |
3535

3636
## Quickstart
3737

@@ -65,7 +65,7 @@ The last thing is to add the following section in the `appsettings.json` to enab
6565
"Enabled": true
6666
},
6767
{
68-
"ProviderName": "EasyAuthWithHeaderService",
68+
"ProviderName": "EasyAuthAzureAdService",
6969
"Enabled": true
7070
}
7171
]
@@ -139,7 +139,7 @@ To configure you providers you simple add the following to your `appsettings.jso
139139
"RoleClaimType": "roles" // optional
140140
},
141141
{
142-
"ProviderName": "EasyAuthWithHeaderService",
142+
"ProviderName": "EasyAuthAzureAdService",
143143
"Enabled": true,
144144
"NameClaimType": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", //optional
145145
"RoleClaimType": "http://schemas.microsoft.com/ws/2008/06/identity/claims/role" //optional
@@ -211,10 +211,28 @@ All providers can be configured with the following section in the `appsettings.j
211211
"RoleClaimType": "roles" // optional
212212
},
213213
{
214-
"ProviderName": "EasyAuthWithHeaderService", // type name of the provider
215-
"Enabled": true,
216-
"NameClaimType": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", //optional
217-
"RoleClaimType": "http://schemas.microsoft.com/ws/2008/06/identity/claims/role" //optional
214+
"ProviderName": "EasyAuthForAuthorizationTokenService",
215+
"Enabled": true
216+
},
217+
{
218+
"ProviderName": "EasyAuthAzureAdService",
219+
"Enabled": true
220+
},
221+
{
222+
"ProviderName": "EasyAuthMicrosoftService",
223+
"Enabled": true
224+
},
225+
{
226+
"ProviderName": "EasyAuthFacebookService",
227+
"Enabled": true
228+
},
229+
{
230+
"ProviderName": "EasyAuthTwitterService",
231+
"Enabled": true
232+
},
233+
{
234+
"ProviderName": "EasyAuthGoogleService",
235+
"Enabled": true
218236
}
219237
],
220238
// the following is optional
@@ -272,10 +290,26 @@ To create a Service Principal (SPN), which get access to your EasyAuth protected
272290

273291
This will allow a spn to get the role `SystemAdmin` in your protected application. The default `User.Identity.Name` of an SPN is the SPN Guid.
274292

275-
### `EasyAuthWithHeaderService`
293+
### `EasyAuthAzureAdService`
276294

277295
This is the most common auth provider. You can use it to work with Azure Active Directory Users in your easy auth application.
278296

297+
### EasyAuthMicrosoftService
298+
299+
If your users only has personal accounts because your app isn't a bushiness application, use this provider.
300+
301+
### EasyAuthFacebookService
302+
303+
If your users are primary come from facebook use this provider.
304+
305+
### EasyAuthTwitterService
306+
307+
If your users are primary come from twitter use this provider.
308+
309+
### EasyAuthGoogleService
310+
311+
If your users are primary come from twitter use this provider.
312+
279313
## Authors
280314

281315
- **Kirsten Kluge** - _Initial work_ - [kirkone](https://github.com/kirkone)
@@ -285,7 +319,7 @@ This is the most common auth provider. You can use it to work with Azure Active
285319
- **Suzuko123** - _Dropped some knowledge about Service Principals with easy auth_ - [Suzuko123](https://github.com/Suzuko123)
286320
- **MaximRouiller** - _Dropped the idea to check if the app service is configured right. .[MaximRouiller](https://github.com/MaximRouiller)
287321

288-
See also the list of [contributors](https://github.com/kirkone/KK.AspNetCore.EasyAuthAuthentication/graphs/contributors) who participated in this project.
322+
See also the list of [contributors](https://github.com/kirkone/CZ.AspNetCore.EasyAuthAuthentication/graphs/contributors) who participated in this project.
289323

290324
## License
291325

global.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"sdk": {
3-
"version": "3.1.101"
3+
"version": "3.1.101",
4+
"rollForward": "latestFeature"
45
}
56
}

pipelines/KK.AspNetCore.EasyAuthAuthentication.yaml renamed to pipelines/CZ.AspNetCore.EasyAuthAuthentication.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ variables:
2121
# Disable sending usage data to Microsoft
2222
DOTNET_CLI_TELEMETRY_OPTOUT: true
2323
BuildConfiguration: 'Release'
24-
Project: '$(Build.SourcesDirectory)/src/KK.AspNetCore.EasyAuthAuthentication/KK.AspNetCore.EasyAuthAuthentication.csproj'
25-
ProjectFolder: '$(Build.SourcesDirectory)/src/KK.AspNetCore.EasyAuthAuthentication'
24+
Project: '$(Build.SourcesDirectory)/src/CZ.AspNetCore.EasyAuthAuthentication/CZ.AspNetCore.EasyAuthAuthentication.csproj'
25+
ProjectFolder: '$(Build.SourcesDirectory)/src/CZ.AspNetCore.EasyAuthAuthentication'
2626
GitVersion: '5.1.3'
2727

2828
name: $(Year:yy)$(DayOfYear)$(Rev:rr)
@@ -78,7 +78,7 @@ stages:
7878
parameters:
7979
name: 'PR'
8080
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
81-
buildProperties: 'VersionPrefix=$(GitVersion_MajorMinorPatch);VersionSuffix=pre-$(Build.BuildNumber);PackageId=PR-$(System.PullRequest.pullRequestNumber)-KK.AspNetCore.EasyAuthAuthentication'
81+
buildProperties: 'VersionPrefix=$(GitVersion_MajorMinorPatch);VersionSuffix=pre-$(Build.BuildNumber);PackageId=PR-$(System.PullRequest.pullRequestNumber)-CZ.AspNetCore.EasyAuthAuthentication'
8282

8383
- template: templates/NuGet.Pack.yaml
8484
parameters:

samples/KK.AspNetCore.EasyAuthAuthentication.Samples.Client/KK.AspNetCore.EasyAuthAuthentication.Samples.Client.csproj renamed to samples/CZ.AspNetCore.EasyAuthAuthentication.Samples.Client/CZ.AspNetCore.EasyAuthAuthentication.Samples.Client.csproj

File renamed without changes.

samples/KK.AspNetCore.EasyAuthAuthentication.Samples.Client/Program.cs renamed to samples/CZ.AspNetCore.EasyAuthAuthentication.Samples.Client/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace KK.AspNetCore.EasyAuthAuthentication.Samples.Webs.Client
1+
namespace CZ.AspNetCore.EasyAuthAuthentication.Samples.Webs.Client
22
{
33
using System;
44
using System.IO;

samples/KK.AspNetCore.EasyAuthAuthentication.Samples.Web/.gitignore renamed to samples/CZ.AspNetCore.EasyAuthAuthentication.Samples.Web/.gitignore

File renamed without changes.

0 commit comments

Comments
 (0)