Skip to content

Commit ebc217a

Browse files
committed
add project file
1 parent ba66130 commit ebc217a

File tree

3 files changed

+35
-25
lines changed

3 files changed

+35
-25
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net4.8</TargetFramework>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<Reference Include="System.Configuration" />
10+
<Reference Include="System.IdentityModel" />
11+
<Reference Include="System.ServiceModel" />
12+
</ItemGroup>
13+
14+
</Project>

snippets/csharp/VS_Snippets_CFX/samlattribute/cs/makefile

Lines changed: 0 additions & 4 deletions
This file was deleted.

snippets/csharp/VS_Snippets_CFX/samlattribute/cs/source.cs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//-----------------------------------------------------------------------------
1+
//-----------------------------------------------------------------------------
22
// Copyright (c) Microsoft Corporation. All rights reserved.
33
//-----------------------------------------------------------------------------
44
using System;
@@ -80,7 +80,7 @@ protected override Collection<SamlAttribute> GetIssuedClaims(RequestSecurityToke
8080
return samlAttributes;
8181
}
8282
//</snippet1>
83-
public static void Main() {}
83+
public static void Main() { }
8484

8585
#region Helper Methods
8686
/// <summary>
@@ -139,7 +139,7 @@ private static bool CheckIfPurchaseLimitMet(string bookID)
139139
return false;
140140

141141
List<ClaimSet> claimsets = new List<ClaimSet>(authContext.ClaimSets);
142-
ClaimSet myClaimSet = claimsets.Find((Predicate<ClaimSet>)delegate(ClaimSet target)
142+
ClaimSet myClaimSet = claimsets.Find((Predicate<ClaimSet>)delegate (ClaimSet target)
143143
{
144144
X509CertificateClaimSet certClaimSet = target.Issuer as X509CertificateClaimSet;
145145
return certClaimSet != null && certClaimSet.X509Certificate.Subject == "CN=HomeRealmSTS.com";
@@ -247,8 +247,8 @@ private static bool IssuedByHomeRealmSTS(ClaimSet myClaimSet)
247247
/// Abstract base class for STS implementations.
248248
/// </summary>
249249
public abstract class SecurityTokenService : ISecurityTokenService
250-
{
251-
string stsName; // The name of the STS. Used to populate saml:Assertion/@Issuer
250+
{
251+
string stsName; // The name of the STS. Used to populate saml:Assertion/@Issuer
252252
SecurityToken issuerToken; // The SecurityToken used to sign issued tokens
253253
SecurityToken proofKeyEncryptionToken; // The SecurityToken used to encrypt the proof key in the issued token.
254254

@@ -289,7 +289,7 @@ protected SecurityToken ProofKeyEncryptionToken
289289
get { return this.proofKeyEncryptionToken; }
290290
}
291291

292-
#region Abstract methods
292+
#region Abstract methods
293293

294294
/// <summary>
295295
/// Abstract method for setting up claims in the SAML Token issued by the STS
@@ -322,7 +322,7 @@ protected static void EnsureRequestSecurityTokenAction(Message message)
322322
protected static BinarySecretSecurityToken CreateProofToken(int keySize)
323323
{
324324
// Create an array to store the key bytes.
325-
byte[] key = new byte[keySize/8];
325+
byte[] key = new byte[keySize / 8];
326326

327327
// Create some random bytes.
328328
using (RandomNumberGenerator random = RandomNumberGenerator.Create())
@@ -856,14 +856,14 @@ private static EndpointAddress ProcessAppliesToElement(XmlReader xr)
856856
!xr.IsEmptyElement &&
857857
XmlNodeType.Element == xr.NodeType)
858858
{
859-
// <Snippet11>
859+
// <Snippet11>
860860
// Create a DataContractSerializer for an EndpointAddress10.
861861
DataContractSerializer dcs = new DataContractSerializer(typeof(EndpointAddress10));
862862
// Read the EndpointAddress10 from the DataContractSerializer.
863863
EndpointAddress10 ea10 = (EndpointAddress10)dcs.ReadObject(xr, false);
864864
// Convert the EndpointAddress10 into an EndpointAddress.
865865
ea = ea10.ToEndpointAddress();
866-
// </Snippet11>
866+
// </Snippet11>
867867
}
868868

869869
// Look for the end-tag that corresponds to the start-tag that the reader was positioned
@@ -1074,7 +1074,7 @@ public static byte[] ComputeCombinedKey(byte[] requestorEntropy, byte[] issuerEn
10741074
byte[] a = issuerEntropy; // A(0)
10751075
byte[] b = new byte[kha.HashSize / 8 + a.Length]; // Buffer for A(i) + seed
10761076

1077-
for (int i = 0; i < key.Length; )
1077+
for (int i = 0; i < key.Length;)
10781078
{
10791079
// Calculate A(i+1).
10801080
kha.Initialize();
@@ -1358,20 +1358,20 @@ class ServiceConstants
13581358
/// </summary>
13591359
public static void LoadAppSettings()
13601360
{
1361-
/*
1362-
BookDB = ConfigurationManager.AppSettings["bookDB"];
1363-
CheckIfLoaded(BookDB);
1364-
BookDB = string.Format("{0}\\{1}", System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath, BookDB);
1361+
/*
1362+
BookDB = ConfigurationManager.AppSettings["bookDB"];
1363+
CheckIfLoaded(BookDB);
1364+
BookDB = string.Format("{0}\\{1}", System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath, BookDB);
13651365
1366-
CertDistinguishedName = ConfigurationManager.AppSettings["certDistinguishedName"];
1367-
CheckIfLoaded(CertDistinguishedName);
1366+
CertDistinguishedName = ConfigurationManager.AppSettings["certDistinguishedName"];
1367+
CheckIfLoaded(CertDistinguishedName);
13681368
1369-
TargetDistinguishedName = ConfigurationManager.AppSettings["targetDistinguishedName"];
1370-
CheckIfLoaded(TargetDistinguishedName);
1369+
TargetDistinguishedName = ConfigurationManager.AppSettings["targetDistinguishedName"];
1370+
CheckIfLoaded(TargetDistinguishedName);
13711371
1372-
IssuerDistinguishedName = ConfigurationManager.AppSettings["issuerDistinguishedName"];
1373-
CheckIfLoaded(IssuerDistinguishedName);
1374-
*/
1372+
IssuerDistinguishedName = ConfigurationManager.AppSettings["issuerDistinguishedName"];
1373+
CheckIfLoaded(IssuerDistinguishedName);
1374+
*/
13751375
}
13761376

13771377
/// <summary>

0 commit comments

Comments
 (0)