Skip to content

Commit

Permalink
Added Abc.IdentityModel.ClaimExtensions, Abc.IdentityModel.Http, Abc.…
Browse files Browse the repository at this point in the history
…IdentityModel.Http.Saml, Abc.IdentityModel.Tokens.Jwt
  • Loading branch information
Juris Gekiss authored and Juris Gekiss committed Oct 9, 2023
1 parent ebd7a71 commit eff722e
Show file tree
Hide file tree
Showing 139 changed files with 20,598 additions and 5 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@

# TODO
z_*/
Abc.IdentityModel.ClaimExtensions/
Abc.IdentityModel.Http/
Abc.IdentityModel.Http.Saml/
Abc.IdentityModel.Protocols.EidasLight/
Abc.IdentityModel.Protocols.HomeRealmDiscovery/
Abc.IdentityModel.Protocols.Saml2/
Abc.IdentityModel.Protocols.WsFederation/
Abc.IdentityModel.Protocols.WsSecurity/

Expand Down
14 changes: 14 additions & 0 deletions Abc.IdentityModel.sln
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{23BAA3C5-E64
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{B51104E7-298C-4C57-A1E6-A5DC645F1B8E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Abc.IdentityModel.Tokens.Jwt", "src\Abc.IdentityModel.Tokens.Jwt\Abc.IdentityModel.Tokens.Jwt.csproj", "{4FAF757C-98F6-4BE4-8529-5E4F4A408122}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Abc.IdentityModel.Tokens.Jwt.UnitTests", "test\Abc.IdentityModel.Tokens.Jwt.UnitTests\Abc.IdentityModel.Tokens.Jwt.UnitTests.csproj", "{6C0555D9-28CC-4722-9188-DD69F6DCE44F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -101,6 +105,14 @@ Global
{2DF9A27E-5B76-4CEC-8221-BA1B0F88F864}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2DF9A27E-5B76-4CEC-8221-BA1B0F88F864}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2DF9A27E-5B76-4CEC-8221-BA1B0F88F864}.Release|Any CPU.Build.0 = Release|Any CPU
{4FAF757C-98F6-4BE4-8529-5E4F4A408122}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4FAF757C-98F6-4BE4-8529-5E4F4A408122}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FAF757C-98F6-4BE4-8529-5E4F4A408122}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4FAF757C-98F6-4BE4-8529-5E4F4A408122}.Release|Any CPU.Build.0 = Release|Any CPU
{6C0555D9-28CC-4722-9188-DD69F6DCE44F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6C0555D9-28CC-4722-9188-DD69F6DCE44F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6C0555D9-28CC-4722-9188-DD69F6DCE44F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6C0555D9-28CC-4722-9188-DD69F6DCE44F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -119,6 +131,8 @@ Global
{F9A88FBF-2A6D-410B-881B-31D8B29C8C05} = {23BAA3C5-E64C-47B8-8D2A-53EE17C4004F}
{F0CB1FE1-26F0-40C6-8267-7C707036F3E7} = {B51104E7-298C-4C57-A1E6-A5DC645F1B8E}
{2DF9A27E-5B76-4CEC-8221-BA1B0F88F864} = {23BAA3C5-E64C-47B8-8D2A-53EE17C4004F}
{4FAF757C-98F6-4BE4-8529-5E4F4A408122} = {23BAA3C5-E64C-47B8-8D2A-53EE17C4004F}
{6C0555D9-28CC-4722-9188-DD69F6DCE44F} = {B51104E7-298C-4C57-A1E6-A5DC645F1B8E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7A1FCDD4-DB9D-455F-BE17-752FBAEC340B}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>


</Project>
24 changes: 24 additions & 0 deletions src/Abc.IdentityModel.ClaimExtensions/ClaimProperties.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Abc.IdentityModel.Extensions {
/// <summary>
/// Defines the keys for properties contained in <see cref="Claim.Properties"/>.
/// </summary>
internal static class ClaimProperties {
#pragma warning disable 1591
public const string Namespace = "http://schemas.xmlsoap.org/ws/2005/05/identity/claimproperties";

public const string SamlNameIdentifierFormat = Namespace + "/format";
public const string SamlNameIdentifierNameQualifier = Namespace + "/namequalifier";
public const string SamlNameIdentifierSPNameQualifier = Namespace + "/spnamequalifier";
public const string SamlNameIdentifierSPProvidedId = Namespace + "/spprovidedid";
public const string SamlSubjectConfirmationMethod = Namespace + "/confirmationmethod";
public const string SamlSubjectConfirmationData = Namespace + "/confirmationdata";
public const string SamlSubjectKeyInfo = Namespace + "/keyinfo";
public const string SamlAttributeFriendlyName = Namespace + "/friendlyname";
public const string SamlAttributeNameFormat = Namespace + "/attributename";
#pragma warning restore 1591
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
// ----------------------------------------------------------------------------
// <copyright file="ClaimNotFoundException.cs" company="ABC Software Ltd">
// Copyright © 2010-2019 ABC Software Ltd. All rights reserved.
//
// This library is free software; you can redistribute it and/or.
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation, either
// version 3 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the library. If not, see http://www.gnu.org/licenses/.
// </copyright>
// ----------------------------------------------------------------------------

namespace Abc.IdentityModel.Extensions {
using System;
using System.Runtime.Serialization;

/// <summary>
/// Exception for failed claims search operations
/// </summary>
/// <remarks>
/// The idea of Dominick Baier.
/// </remarks>
[Serializable]
public class ClaimNotFoundException : Exception {
// For guidelines regarding the creation of new exception types, see
// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconerrorraisinghandlingguidelines.asp
// and
// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp07192001.asp
#region Constructors

/// <summary>
/// Initializes a new instance of the <see cref="ClaimNotFoundException"/> class.
/// </summary>
public ClaimNotFoundException() {
}

/// <summary>
/// Initializes a new instance of the <see cref="ClaimNotFoundException"/> class.
/// </summary>
/// <param name="message">
/// The message.
/// </param>
public ClaimNotFoundException(string message)
: base(message) {
}

/// <summary>
/// Initializes a new instance of the <see cref="ClaimNotFoundException"/> class.
/// </summary>
/// <param name="message">
/// The message.
/// </param>
/// <param name="inner">
/// The inner.
/// </param>
public ClaimNotFoundException(string message, Exception inner)
: base(message, inner) {
}

/// <summary>
/// Initializes a new instance of the <see cref="ClaimNotFoundException"/> class.
/// </summary>
/// <param name="info">
/// The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data about the exception being thrown.
/// </param>
/// <param name="context">
/// The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.
/// </param>
/// <exception cref="T:System.ArgumentNullException">
/// The <paramref name="info"/> parameter is null.
/// </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">
/// The class name is null or <see cref="P:System.Exception.HResult"/> is zero (0).
/// </exception>
protected ClaimNotFoundException(SerializationInfo info, StreamingContext context)
: base(info, context) {
}

#endregion
}
}
Loading

0 comments on commit eff722e

Please sign in to comment.