Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SuperOffice provider #417

Merged
merged 137 commits into from
Jul 7, 2020
Merged
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
6b75310
Initial checkin SuperOffice provider
SuperOfficeDevNet May 4, 2020
f19e703
Removed dependency on JetBrains.Annotations
SuperOfficeDevNet May 4, 2020
d563257
Updated README.md with SuperOffice info
SuperOfficeDevNet May 4, 2020
4d1ac8a
Updated README.md with SuperOffice details.
SuperOfficeDevNet May 4, 2020
31ac0d6
Removed duplicate SuperOffice entry.
AnthonyYates May 4, 2020
e984e45
Update src/AspNet.Security.OAuth.SuperOffice/Implementation/DefaultSu…
AnthonyYates May 4, 2020
05088a2
Update src/AspNet.Security.OAuth.SuperOffice/SuperOfficeAuthenticatio…
AnthonyYates May 4, 2020
3c61c1a
Update src/AspNet.Security.OAuth.SuperOffice/SuperOfficeAuthenticatio…
AnthonyYates May 4, 2020
f7e0587
Spelling correction.
AnthonyYates May 4, 2020
8a7d99b
Spelling correction.
AnthonyYates May 4, 2020
b7814d5
Spelling correction.
AnthonyYates May 4, 2020
8bdb2b9
Spelling correction.
AnthonyYates May 4, 2020
c12eb98
Apply Spelling corrections.
AnthonyYates May 4, 2020
85d50f8
Spelling corrections
AnthonyYates May 4, 2020
8ccf405
Minor updates based on PR comments.
SuperOfficeDevNet May 4, 2020
c34753c
Merge branch 'dev' of https://github.com/AnthonyYates/AspNet.Security…
SuperOfficeDevNet May 4, 2020
8c2a6d4
Revert "Minor updates based on PR comments."
SuperOfficeDevNet May 4, 2020
fab6b66
Undid test cs proj file changes
SuperOfficeDevNet May 4, 2020
9e26f1d
Minor updates.
SuperOfficeDevNet May 4, 2020
1c3b602
Updated comment.
SuperOfficeDevNet May 4, 2020
5a9bb67
Updated Options.ClaimActions
SuperOfficeDevNet May 4, 2020
accd181
Changed string comparison option.
AnthonyYates May 4, 2020
0810018
Simplified Configuration - Jwks Handling
SuperOfficeDevNet May 6, 2020
23d66c5
Merge branch 'dev' of https://github.com/AnthonyYates/AspNet.Security…
SuperOfficeDevNet May 6, 2020
aa40d3f
Refactored to use ConfigurationManager. Bumped SystemIdentityModelTok…
SuperOfficeDevNet May 10, 2020
b00615d
Updated SuperOfficeTest.cs
SuperOfficeDevNet May 10, 2020
c52cd77
Updated SaveToken method.
SuperOfficeDevNet May 10, 2020
bcf1608
Update Apple provider to support latest System.IdentityModel.Tokens.J…
SuperOfficeDevNet May 10, 2020
4402775
Simplified token validation. Code clean up.
SuperOfficeDevNet May 10, 2020
8839094
Updated code formatting.
SuperOfficeDevNet May 10, 2020
8d21440
Fix configuration sorting.
SuperOfficeDevNet May 10, 2020
8ef52e7
Update out of sync Versions.props.
SuperOfficeDevNet May 10, 2020
4891552
Added dependency variable to Version. Updated property initializer or…
SuperOfficeDevNet May 10, 2020
daab342
Simplified ConfigurationManager instantiation. Fixed comment.
SuperOfficeDevNet May 10, 2020
3fe0920
Removed redundant package reference.
SuperOfficeDevNet May 10, 2020
d9d4837
Refactored identity claim processing and content identifier resolution.
SuperOfficeDevNet May 10, 2020
8d65e66
Update src/AspNet.Security.OAuth.SuperOffice/SuperOfficeAuthenticatio…
AnthonyYates May 10, 2020
6ce0015
Update src/AspNet.Security.OAuth.SuperOffice/SuperOfficeAuthenticatio…
AnthonyYates May 10, 2020
3f8967b
Update src/AspNet.Security.OAuth.SuperOffice/SuperOfficeAuthenticatio…
AnthonyYates May 10, 2020
915aa91
Update passing TokenValidationParameter to Validation
SuperOfficeDevNet May 10, 2020
416f64d
Merge branch 'dev' of https://github.com/AnthonyYates/AspNet.Security…
SuperOfficeDevNet May 10, 2020
9422dc9
Update src/AspNet.Security.OAuth.SuperOffice/SuperOfficeAuthenticatio…
AnthonyYates May 10, 2020
7ea9879
Update src/AspNet.Security.OAuth.SuperOffice/SuperOfficeAuthenticatio…
AnthonyYates May 10, 2020
42382ea
Added Async suffix to ProcessIdTokenAndGetContentIdentitifer
SuperOfficeDevNet May 10, 2020
48cd5be
Merge branch 'dev' of https://github.com/AnthonyYates/AspNet.Security…
SuperOfficeDevNet May 10, 2020
90779c9
Reset versions.props to last checkin in main repo
SuperOfficeDevNet May 10, 2020
2f53c75
Update Versions.props - try to fix conflict.
SuperOfficeDevNet May 10, 2020
890a48e
Merge branch 'dev' into dev
AnthonyYates May 10, 2020
7d60e89
Updated. Moved JwtSecurityTokenHandler into Options
SuperOfficeDevNet May 11, 2020
37e99a7
Reordered fields and properties to alphabetical order.
SuperOfficeDevNet May 11, 2020
ba17207
Update SaveTokens with cleared comments.
AnthonyYates May 14, 2020
4b314c5
Updated Exceptions, Test and ClaimMapping ordering.
SuperOfficeDevNet May 14, 2020
7c4dad9
Merge branch 'dev' of https://github.com/AnthonyYates/AspNet.Security…
SuperOfficeDevNet May 14, 2020
1010573
Added SuperOfficeFunctionalRightsClaimAction, Fixed missing variable …
SuperOfficeDevNet May 14, 2020
2571619
Updated tests to assert FunctionRights. Sorted what 'should' to be so…
SuperOfficeDevNet May 14, 2020
3a700ea
Removed dereferencing comments. Removed string interpolation character.
SuperOfficeDevNet May 14, 2020
3699778
Renamed Constants.PrincipalNames.EMailAddress
SuperOfficeDevNet May 14, 2020
dedcbe3
Reordered Test methods.
SuperOfficeDevNet May 14, 2020
9b2ff05
Changed JwtSecurityTokenHandler to JsonWebTokenHandler
SuperOfficeDevNet May 14, 2020
a802b15
Updated potential Validate InvalidOperationException message - moved …
SuperOfficeDevNet May 14, 2020
0c07cac
Updates comment in src/AspNet.Security.OAuth.SuperOffice/SuperOfficeA…
AnthonyYates May 14, 2020
bedd6c5
Update src/AspNet.Security.OAuth.SuperOffice/SuperOfficeFunctionalRig…
AnthonyYates May 14, 2020
1ac7ac1
Fixed SecurityTokenHandler property comment.
SuperOfficeDevNet May 14, 2020
1e92824
Fix sorting
martincostello May 14, 2020
a54830b
TokenValidationParameters.Clone, shorten exception message, replaced …
SuperOfficeDevNet May 18, 2020
75f010b
Removed Options.ValidateToken option.
SuperOfficeDevNet May 18, 2020
42afb37
Initial checkin SuperOffice provider
SuperOfficeDevNet May 4, 2020
b66c4dd
Removed dependency on JetBrains.Annotations
SuperOfficeDevNet May 4, 2020
dbd4acb
Updated README.md with SuperOffice info
SuperOfficeDevNet May 4, 2020
b386230
Updated README.md with SuperOffice details.
SuperOfficeDevNet May 4, 2020
071455b
Removed duplicate SuperOffice entry.
AnthonyYates May 4, 2020
d8a3c8e
Update src/AspNet.Security.OAuth.SuperOffice/Implementation/DefaultSu…
AnthonyYates May 4, 2020
be5e4c7
Update src/AspNet.Security.OAuth.SuperOffice/SuperOfficeAuthenticatio…
AnthonyYates May 4, 2020
560cabe
Update src/AspNet.Security.OAuth.SuperOffice/SuperOfficeAuthenticatio…
AnthonyYates May 4, 2020
d9fc235
Spelling correction.
AnthonyYates May 4, 2020
9ea9c54
Spelling correction.
AnthonyYates May 4, 2020
829a121
Spelling correction.
AnthonyYates May 4, 2020
cd15cf9
Spelling correction.
AnthonyYates May 4, 2020
779ce3e
Apply Spelling corrections.
AnthonyYates May 4, 2020
2acc271
Spelling corrections
AnthonyYates May 4, 2020
4daddc6
Minor updates based on PR comments.
SuperOfficeDevNet May 4, 2020
ec157e1
Revert "Minor updates based on PR comments."
SuperOfficeDevNet May 4, 2020
251344e
Undid test cs proj file changes
SuperOfficeDevNet May 4, 2020
e3dc2b4
Minor updates.
SuperOfficeDevNet May 4, 2020
ead77e6
Updated comment.
SuperOfficeDevNet May 4, 2020
134bfa8
Updated Options.ClaimActions
SuperOfficeDevNet May 4, 2020
2685f25
Changed string comparison option.
AnthonyYates May 4, 2020
f4a6bfc
Simplified Configuration - Jwks Handling
SuperOfficeDevNet May 6, 2020
90b8ebc
Refactored to use ConfigurationManager. Bumped SystemIdentityModelTok…
SuperOfficeDevNet May 10, 2020
9ddec7e
Updated SuperOfficeTest.cs
SuperOfficeDevNet May 10, 2020
b2713c1
Updated SaveToken method.
SuperOfficeDevNet May 10, 2020
f91e5b2
Update Apple provider to support latest System.IdentityModel.Tokens.J…
SuperOfficeDevNet May 10, 2020
0c112cc
Simplified token validation. Code clean up.
SuperOfficeDevNet May 10, 2020
0df819c
Updated code formatting.
SuperOfficeDevNet May 10, 2020
1806a48
Fix configuration sorting.
SuperOfficeDevNet May 10, 2020
c01b892
Added dependency variable to Version. Updated property initializer or…
SuperOfficeDevNet May 10, 2020
7951940
Simplified ConfigurationManager instantiation. Fixed comment.
SuperOfficeDevNet May 10, 2020
1174c30
Removed redundant package reference.
SuperOfficeDevNet May 10, 2020
1c8ee24
Refactored identity claim processing and content identifier resolution.
SuperOfficeDevNet May 10, 2020
f798d33
Update src/AspNet.Security.OAuth.SuperOffice/SuperOfficeAuthenticatio…
AnthonyYates May 10, 2020
a01a8a0
Update src/AspNet.Security.OAuth.SuperOffice/SuperOfficeAuthenticatio…
AnthonyYates May 10, 2020
2d2b140
Update src/AspNet.Security.OAuth.SuperOffice/SuperOfficeAuthenticatio…
AnthonyYates May 10, 2020
8cbea2b
Update passing TokenValidationParameter to Validation
SuperOfficeDevNet May 10, 2020
cfa43d5
Update src/AspNet.Security.OAuth.SuperOffice/SuperOfficeAuthenticatio…
AnthonyYates May 10, 2020
cec0416
Update src/AspNet.Security.OAuth.SuperOffice/SuperOfficeAuthenticatio…
AnthonyYates May 10, 2020
650bfb0
Added Async suffix to ProcessIdTokenAndGetContentIdentitifer
SuperOfficeDevNet May 10, 2020
1a8aac3
Reset versions.props to last checkin in main repo
SuperOfficeDevNet May 10, 2020
aac9d8f
Update Versions.props - try to fix conflict.
SuperOfficeDevNet May 10, 2020
81a044c
Updated. Moved JwtSecurityTokenHandler into Options
SuperOfficeDevNet May 11, 2020
be818ca
Reordered fields and properties to alphabetical order.
SuperOfficeDevNet May 11, 2020
a8d2150
Update SaveTokens with cleared comments.
AnthonyYates May 14, 2020
fac95d4
Updated Exceptions, Test and ClaimMapping ordering.
SuperOfficeDevNet May 14, 2020
cdf3b43
Added SuperOfficeFunctionalRightsClaimAction, Fixed missing variable …
SuperOfficeDevNet May 14, 2020
4c60aef
Updated tests to assert FunctionRights. Sorted what 'should' to be so…
SuperOfficeDevNet May 14, 2020
ae1b91c
Removed dereferencing comments. Removed string interpolation character.
SuperOfficeDevNet May 14, 2020
1be9008
Renamed Constants.PrincipalNames.EMailAddress
SuperOfficeDevNet May 14, 2020
ac9c926
Reordered Test methods.
SuperOfficeDevNet May 14, 2020
556d6cd
Changed JwtSecurityTokenHandler to JsonWebTokenHandler
SuperOfficeDevNet May 14, 2020
7a89721
Updated potential Validate InvalidOperationException message - moved …
SuperOfficeDevNet May 14, 2020
02ed775
Updates comment in src/AspNet.Security.OAuth.SuperOffice/SuperOfficeA…
AnthonyYates May 14, 2020
a873e06
Update src/AspNet.Security.OAuth.SuperOffice/SuperOfficeFunctionalRig…
AnthonyYates May 14, 2020
7aeadd7
Fixed SecurityTokenHandler property comment.
SuperOfficeDevNet May 14, 2020
873f10e
Fix sorting
martincostello May 14, 2020
887f0a2
TokenValidationParameters.Clone, shorten exception message, replaced …
SuperOfficeDevNet May 18, 2020
8b1468d
Removed Options.ValidateToken option.
SuperOfficeDevNet May 18, 2020
23f289c
Merge branch 'dev' of https://github.com/AnthonyYates/AspNet.Security…
SuperOfficeDevNet May 22, 2020
7d7aeb0
Merge branch 'dev' into dev
AnthonyYates Jul 2, 2020
96056c5
Updated referenced package reference IAW project changes
SuperOfficeDevNet Jul 2, 2020
3191dee
Updated Directory.Packages.props with Conditional version check
SuperOfficeDevNet Jul 2, 2020
5a5a259
Updated Directory.Packages.props, bump System.IdentityModel.Tokens.Jw…
SuperOfficeDevNet Jul 2, 2020
31ba79d
Update Directory.Packages.props, System.IdentityModel.Tokens.Jwt" Ver…
SuperOfficeDevNet Jul 2, 2020
1c548e3
Update Directory.Packages.props, reset Tokens package to 5.4.0
SuperOfficeDevNet Jul 2, 2020
46e6085
Merge remote-tracking branch 'upstream/dev' into dev
SuperOfficeDevNet Jul 5, 2020
2999a98
Updated IdentityModel packages to 5.6.0, and one AppleTest
SuperOfficeDevNet Jul 5, 2020
cbc75ef
Fix Sln file, and add space in Packages.props
SuperOfficeDevNet Jul 5, 2020
ece145e
Changed System.IdentityModel libs to 5.5.0
SuperOfficeDevNet Jul 7, 2020
e89a24f
Merge remote-tracking branch 'upstream/dev' into dev
SuperOfficeDevNet Jul 7, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions AspNet.Security.OAuth.Providers.sln
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{C2CA4B38-A
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OAuth.Basecamp", "src\AspNet.Security.OAuth.Basecamp\AspNet.Security.OAuth.Basecamp.csproj", "{42306484-B2BF-4B52-B950-E0CDFA58B02A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNet.Security.OAuth.SuperOffice", "src\AspNet.Security.OAuth.SuperOffice\AspNet.Security.OAuth.SuperOffice.csproj", "{286D1FB0-716C-47CB-A519-22E1D34DFDF7}"
martincostello marked this conversation as resolved.
Show resolved Hide resolved
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -447,6 +449,10 @@ Global
{42306484-B2BF-4B52-B950-E0CDFA58B02A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42306484-B2BF-4B52-B950-E0CDFA58B02A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{42306484-B2BF-4B52-B950-E0CDFA58B02A}.Release|Any CPU.Build.0 = Release|Any CPU
{286D1FB0-716C-47CB-A519-22E1D34DFDF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{286D1FB0-716C-47CB-A519-22E1D34DFDF7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{286D1FB0-716C-47CB-A519-22E1D34DFDF7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{286D1FB0-716C-47CB-A519-22E1D34DFDF7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -520,6 +526,7 @@ Global
{E82424B3-0E73-4954-B6A6-BFF1029A08DE} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
{C2CA4B38-AA21-4CA4-8799-2E8C8C06754F} = {E9DAB098-A902-4EF5-9AEE-CF735DF31E35}
{42306484-B2BF-4B52-B950-E0CDFA58B02A} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
{286D1FB0-716C-47CB-A519-22E1D34DFDF7} = {C1352FD3-AE8B-43EE-B45B-F6E0B3FBAC6D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C7B54DE2-6407-4802-AD9C-CE54BF414C8C}
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ We would love it if you could help contributing to this repository.
* [Andrew Lock](https://github.com/andrewlock)
* [Andrew Mattie](https://github.com/amattie)
* [Andrii Chebukin](https://github.com/xperiandri)
* [Anthony Yates](https://github.com/AnthonyYates)
* [Chino Chang](https://github.com/kinosang)
* [Dave Timmins](https://github.com/davetimmins)
* [Dmitry Popov](https://github.com/justdmitry)
Expand Down Expand Up @@ -156,6 +157,7 @@ If a provider you're looking for does not exist, consider making a PR to add one
| Spotify | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.Spotify?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.Spotify/ "Download AspNet.Security.OAuth.Spotify from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.Spotify?includePreReleases=false)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.Spotify "Download AspNet.Security.OAuth.Spotify from MyGet.org") | [Documentation](https://developer.spotify.com/documentation/general/guides/authorization-guide/ "Spotify developer documentation") |
| Stack Exchange | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.StackExchange?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.StackExchange/ "Download AspNet.Security.OAuth.StackExchange from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.StackExchange?includePreReleases=false)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.StackExchange "Download AspNet.Security.OAuth.StackExchange from MyGet.org") | [Documentation](https://api.stackexchange.com/docs/authentication "Stack Exchange developer documentation") |
| Strava | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.Strava?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.Strava/ "Download AspNet.Security.OAuth.Strava from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.Strava?includePreReleases=false)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.Strava "Download AspNet.Security.OAuth.Strava from MyGet.org") | [Documentation](https://developers.strava.com/docs/authentication/ "Strava developer documentation") |
| SuperOffice | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.SuperOffice?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.SuperOffice/ "Download AspNet.Security.OAuth.SuperOffice from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.SuperOffice?includePreReleases=false)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.SuperOffice "Download AspNet.Security.OAuth.SuperOffice from MyGet.org") | [Documentation](https://community.superoffice.com/en/developer/create-apps/concepts/authentication/ "SuperOffice developer documentation") |
| Trakt | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.Trakt?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.Trakt/ "Download AspNet.Security.OAuth.Trakt from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.Trakt?includePreReleases=false)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.Trakt "Download AspNet.Security.OAuth.Trakt from MyGet.org") | [Documentation](https://trakt.docs.apiary.io/ "Trakt developer documentation") |
| Twitch | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.Twitch?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.Twitch/ "Download AspNet.Security.OAuth.Twitch from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.Twitch?includePreReleases=false)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.Twitch "Download AspNet.Security.OAuth.Twitch from MyGet.org") | [Documentation](https://dev.twitch.tv/docs/authentication/ "Twitch developer documentation") |
| Untappd | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OAuth.Untappd?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OAuth.Untappd/ "Download AspNet.Security.OAuth.Untappd from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OAuth.Untappd?includePreReleases=false)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OAuth.Untappd "Download AspNet.Security.OAuth.Untappd from MyGet.org") | [Documentation](https://untappd.com/api/docs#authentication "Untappd developer documentation") |
Expand Down
1 change: 1 addition & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<MartinCostelloLoggingXUnitVersion>0.1.0</MartinCostelloLoggingXUnitVersion>
<MicrosoftAspNetCoreMvcTestingVersion>3.1.3</MicrosoftAspNetCoreMvcTestingVersion>
<MicrosoftAspNetCoreTestHostVersion>3.1.3</MicrosoftAspNetCoreTestHostVersion>
<MicrosoftIdentityModelProtocolsOpenIdConnect>6.5.1</MicrosoftIdentityModelProtocolsOpenIdConnect>
<MicrosoftNETTestSdkVersion>16.6.1</MicrosoftNETTestSdkVersion>
<RoslynAnalyzersVersion>3.0.0</RoslynAnalyzersVersion>
<ShouldlyVersion>3.0.2</ShouldlyVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ private static ECDsa CreateAlgorithm(byte[] keyBlob)
private static SigningCredentials CreateSigningCredentials(string keyId, ECDsa algorithm)
{
var key = new ECDsaSecurityKey(algorithm) { KeyId = keyId };
return new SigningCredentials(key, SecurityAlgorithms.EcdsaSha256Signature);
return new SigningCredentials(key, SecurityAlgorithms.EcdsaSha256Signature)
{
CryptoProviderFactory = new CryptoProviderFactory { CacheSignatureProviders = false }
};
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
<Description>ASP.NET Core security middleware enabling SuperOffice authentication.</Description>
<Authors>Anthony Yates</Authors>
<PackageTags>superoffice;aspnetcore;authentication;oauth;security</PackageTags>
</PropertyGroup>

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="JetBrains.Annotations" Version="$(JetBrainsVersion)" PrivateAssets="All" />
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="$(MicrosoftIdentityModelProtocolsOpenIdConnect)" />
martincostello marked this conversation as resolved.
Show resolved Hide resolved
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,271 @@
/*
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
* See https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers
* for more information concerning the license and the contributors participating to this project.
*/
using Microsoft.AspNetCore.Authentication;

namespace AspNet.Security.OAuth.SuperOffice
{
/// <summary>
/// Contains constants specific to the <see cref="SuperOfficeAuthenticationHandler"/>.
/// </summary>
public static class SuperOfficeAuthenticationConstants
{
public static class ClaimNames
{
/// <summary>
/// Tenant's user identity.
/// </summary>
public const string AssociateId = "http://schemes.superoffice.net/identity/associateid";

/// <summary>
/// Current user's company name.
/// </summary>
public const string CompanyName = "http://schemes.superoffice.net/identity/company_name";

/// <summary>
/// Current user tenant identifier.
/// </summary>
public const string ContextIdentifier = "http://schemes.superoffice.net/identity/ctx";

/// <summary>
/// Current SuperId user email address.
AnthonyYates marked this conversation as resolved.
Show resolved Hide resolved
/// </summary>
public const string Email = "http://schemes.superoffice.net/identity/email";

/// <summary>
/// Current user first name.
/// </summary>
public const string FirstName = "http://schemes.superoffice.net/identity/firstname";

/// <summary>
/// SuperOffice identity provider name.
/// </summary>
public const string IdentityProvider = "http://schemes.superoffice.net/identity/identityprovider";

/// <summary>
/// Current user initials.
/// </summary>
public const string Initials = "http://schemes.superoffice.net/identity/initials";

/// <summary>
/// Determines if current user is an administrator.
/// </summary>
public const string IsAdministrator = "http://schemes.superoffice.net/identity/is_administrator";

/// <summary>
/// Current user last name.
/// </summary>
public const string LastName = "http://schemes.superoffice.net/identity/lastname";

/// <summary>
/// Endpoint of SuperOffice SOAP web services.
/// </summary>
public const string NetServerUrl = "http://schemes.superoffice.net/identity/netserver_url";

/// <summary>
/// Tenant database serial number.
/// </summary>
public const string Serial = "http://schemes.superoffice.net/identity/serial";

/// <summary>
/// Current user's tenant primary email address.
/// </summary>
public const string PrimaryEmail = "http://schemes.superoffice.net/identity/so_primary_email_address";

/// <summary>
/// Identifier used to exchange for a system user ticket.
/// </summary>
public const string SystemToken = "http://schemes.superoffice.net/identity/system_token";

/// <summary>
/// Credentials token used to access web services.
/// </summary>
public const string Ticket = "http://schemes.superoffice.net/identity/ticket";

/// <summary>
/// Current user's username.
/// </summary>
public const string UserPrincipalName = "http://schemes.superoffice.net/identity/upn";

/// <summary>
/// Endpoint of SuperOffice REST web services.
/// </summary>
public const string WebApiUrl = "http://schemes.superoffice.net/identity/webapi_url";
}

internal static class FormatStrings
{
/// <summary>
/// A format string used to construct <see cref="SuperOfficeAuthenticationOptions.Authority"/>.
/// </summary>
public const string Authority = "https://{0}.superoffice.com/login";

/// <summary>
/// A format string used to populate OAuth authorize endpoint.
/// </summary>
public const string AuthorizeEndpoint = "https://{0}.superoffice.com/login/common/oauth/authorize";

/// <summary>
/// A format string used to construct <see cref="AuthenticationSchemeOptions.ClaimsIssuer"/>.
/// </summary>
public const string ClaimsIssuer = "https://{0}.superoffice.com";

/// <summary>
/// A format string used to construct well-known configuration endpoint.
/// </summary>
public const string MetadataEndpoint = "https://{0}.superoffice.com/login/.well-known/openid-configuration";

/// <summary>
/// A format string used to populate OAuth token endpoint.
/// </summary>
public const string TokenEndpoint = "https://{0}.superoffice.com/login/common/oauth/tokens";

/// <summary>
/// A format string used to obtain user claims.
/// </summary>
/// <remarks>The final user information URL contains the protocol, host and tenant.</remarks>
/// <example>https://sod.superoffice.com/Cust12345/api/v1/user/currentPrincipal</example>
public const string UserInfoEndpoint = "/{0}/api/v1/user/currentPrincipal";
}

public static class PrincipalNames
{
/// <summary>
/// Associate name (e.g. logon name) for the current user.
/// </summary>
public const string Associate = "Associate";

/// <summary>
/// Associate ID for the current user.
/// </summary>
public const string AssociateId = "AssociateId";

/// <summary>
/// Business ID for the company that the user belongs to.
/// </summary>
public const string BusinessId = "BusinessId";

/// <summary>
/// Category ID of the company that the user belongs to.
/// </summary>
public const string CategoryId = "CategoryId";

/// <summary>
/// Company of the associate's person.
/// </summary>
public const string ContactId = "ContactId";

/// <summary>
/// Owner (AssociateId) of the company that the user belongs to.
/// </summary>
public const string ContactOwner = "ContactOwner";

/// <summary>
/// Name of the tenant context identifier.
/// </summary>
public const string ContextIdentifier = "ContextIdentifier";

/// <summary>
/// Country ID for the user.
/// </summary>
public const string CountryId = "CountryId";

/// <summary>
/// Name of the database context.
/// </summary>
public const string DatabaseContextIdentifier = "DatabaseContextIdentifier";

/// <summary>
/// Service user access level.
/// </summary>
public const string EjAccessLevel = "EjAccessLevel";
martincostello marked this conversation as resolved.
Show resolved Hide resolved

/// <summary>
/// Primary key in Service user table.
/// </summary>
public const string EjUserId = "EjUserId";

/// <summary>
/// Service user status.
/// </summary>
public const string EjUserStatus = "EjUserStatus";

/// <summary>
/// The Person e-mail address if the associate is a person. Use IsPerson to check.
/// </summary>
public const string EmailAddress = "EMailAddress";

/// <summary>
/// The Person full name if the associate is a person. Use IsPerson to check.
/// </summary>
public const string FullName = "FullName";

/// <summary>
/// Functional rights for the user. This array is sorted.
/// </summary>
public const string FunctionRights = "FunctionRights";

/// <summary>
/// Associate's group ID.
/// </summary>
public const string GroupId = "GroupId";

/// <summary>
/// Country ID for the user's home country. This is the default country ID when creating new items.
/// </summary>
public const string HomeCountryId = "HomeCountryId";

/// <summary>
/// Is this associate a person, and not a resource?
/// </summary>
public const string IsPerson = "IsPerson";

/// <summary>
/// Licenses granted to the site and user.
/// </summary>
public const string Licenses = "Licenses";

/// <summary>
/// Associate's person ID.
/// </summary>
public const string PersonId = "PersonId";

/// <summary>
/// The credentials used for authenticating this user.
/// </summary>
public const string ProvidedCredentials = "ProvidedCredentials";

/// <summary>
/// Description (e.g. tooltip) for the user's role.
/// </summary>
public const string RoleDescription = "RoleDescription";

/// <summary>
/// ID of the user's role.
/// </summary>
public const string RoleId = "RoleId";

/// <summary>
/// Name of the user's role.
/// </summary>
public const string RoleName = "RoleName";

/// <summary>
/// Type of user.
/// </summary>
public const string RoleType = "RoleType";

/// <summary>
/// Secondary user groups.
/// </summary>
public const string SecondaryGroups = "SecondaryGroups";

/// <summary>
/// Type of user.
/// </summary>
public const string UserType = "UserType";
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
* See https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers
* for more information concerning the license and the contributors participating to this project.
*/

using Microsoft.AspNetCore.Authentication;

namespace AspNet.Security.OAuth.SuperOffice
{
/// <summary>
/// Default values used by the SuperOffice authentication middleware.
/// </summary>
public static class SuperOfficeAuthenticationDefaults
{
/// <summary>
/// Default value for <see cref="AuthenticationScheme.Name"/>.
/// </summary>
public const string AuthenticationScheme = "SuperOffice";

/// <summary>
/// Default value for <see cref="RemoteAuthenticationOptions.CallbackPath"/>.
/// </summary>
public const string CallbackPath = "/signin-superoffice";

/// <summary>
/// Default value for <see cref="AuthenticationScheme.DisplayName"/>.
/// </summary>
public static readonly string DisplayName = "SuperOffice";
}
}
Loading