|
1 |
| -//----------------------------------------------------------------------------- |
| 1 | +//----------------------------------------------------------------------------- |
2 | 2 | // Copyright (c) Microsoft Corporation. All rights reserved.
|
3 | 3 | //-----------------------------------------------------------------------------
|
4 | 4 | using System;
|
@@ -80,7 +80,7 @@ protected override Collection<SamlAttribute> GetIssuedClaims(RequestSecurityToke
|
80 | 80 | return samlAttributes;
|
81 | 81 | }
|
82 | 82 | //</snippet1>
|
83 |
| - public static void Main() {} |
| 83 | + public static void Main() { } |
84 | 84 |
|
85 | 85 | #region Helper Methods
|
86 | 86 | /// <summary>
|
@@ -139,7 +139,7 @@ private static bool CheckIfPurchaseLimitMet(string bookID)
|
139 | 139 | return false;
|
140 | 140 |
|
141 | 141 | 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) |
143 | 143 | {
|
144 | 144 | X509CertificateClaimSet certClaimSet = target.Issuer as X509CertificateClaimSet;
|
145 | 145 | return certClaimSet != null && certClaimSet.X509Certificate.Subject == "CN=HomeRealmSTS.com";
|
@@ -247,8 +247,8 @@ private static bool IssuedByHomeRealmSTS(ClaimSet myClaimSet)
|
247 | 247 | /// Abstract base class for STS implementations.
|
248 | 248 | /// </summary>
|
249 | 249 | 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 |
252 | 252 | SecurityToken issuerToken; // The SecurityToken used to sign issued tokens
|
253 | 253 | SecurityToken proofKeyEncryptionToken; // The SecurityToken used to encrypt the proof key in the issued token.
|
254 | 254 |
|
@@ -289,7 +289,7 @@ protected SecurityToken ProofKeyEncryptionToken
|
289 | 289 | get { return this.proofKeyEncryptionToken; }
|
290 | 290 | }
|
291 | 291 |
|
292 |
| - #region Abstract methods |
| 292 | + #region Abstract methods |
293 | 293 |
|
294 | 294 | /// <summary>
|
295 | 295 | /// Abstract method for setting up claims in the SAML Token issued by the STS
|
@@ -322,7 +322,7 @@ protected static void EnsureRequestSecurityTokenAction(Message message)
|
322 | 322 | protected static BinarySecretSecurityToken CreateProofToken(int keySize)
|
323 | 323 | {
|
324 | 324 | // Create an array to store the key bytes.
|
325 |
| - byte[] key = new byte[keySize/8]; |
| 325 | + byte[] key = new byte[keySize / 8]; |
326 | 326 |
|
327 | 327 | // Create some random bytes.
|
328 | 328 | using (RandomNumberGenerator random = RandomNumberGenerator.Create())
|
@@ -856,14 +856,14 @@ private static EndpointAddress ProcessAppliesToElement(XmlReader xr)
|
856 | 856 | !xr.IsEmptyElement &&
|
857 | 857 | XmlNodeType.Element == xr.NodeType)
|
858 | 858 | {
|
859 |
| - // <Snippet11> |
| 859 | + // <Snippet11> |
860 | 860 | // Create a DataContractSerializer for an EndpointAddress10.
|
861 | 861 | DataContractSerializer dcs = new DataContractSerializer(typeof(EndpointAddress10));
|
862 | 862 | // Read the EndpointAddress10 from the DataContractSerializer.
|
863 | 863 | EndpointAddress10 ea10 = (EndpointAddress10)dcs.ReadObject(xr, false);
|
864 | 864 | // Convert the EndpointAddress10 into an EndpointAddress.
|
865 | 865 | ea = ea10.ToEndpointAddress();
|
866 |
| - // </Snippet11> |
| 866 | + // </Snippet11> |
867 | 867 | }
|
868 | 868 |
|
869 | 869 | // 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
|
1074 | 1074 | byte[] a = issuerEntropy; // A(0)
|
1075 | 1075 | byte[] b = new byte[kha.HashSize / 8 + a.Length]; // Buffer for A(i) + seed
|
1076 | 1076 |
|
1077 |
| - for (int i = 0; i < key.Length; ) |
| 1077 | + for (int i = 0; i < key.Length;) |
1078 | 1078 | {
|
1079 | 1079 | // Calculate A(i+1).
|
1080 | 1080 | kha.Initialize();
|
@@ -1358,20 +1358,20 @@ class ServiceConstants
|
1358 | 1358 | /// </summary>
|
1359 | 1359 | public static void LoadAppSettings()
|
1360 | 1360 | {
|
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); |
1365 | 1365 |
|
1366 |
| - CertDistinguishedName = ConfigurationManager.AppSettings["certDistinguishedName"]; |
1367 |
| - CheckIfLoaded(CertDistinguishedName); |
| 1366 | + CertDistinguishedName = ConfigurationManager.AppSettings["certDistinguishedName"]; |
| 1367 | + CheckIfLoaded(CertDistinguishedName); |
1368 | 1368 |
|
1369 |
| - TargetDistinguishedName = ConfigurationManager.AppSettings["targetDistinguishedName"]; |
1370 |
| - CheckIfLoaded(TargetDistinguishedName); |
| 1369 | + TargetDistinguishedName = ConfigurationManager.AppSettings["targetDistinguishedName"]; |
| 1370 | + CheckIfLoaded(TargetDistinguishedName); |
1371 | 1371 |
|
1372 |
| - IssuerDistinguishedName = ConfigurationManager.AppSettings["issuerDistinguishedName"]; |
1373 |
| - CheckIfLoaded(IssuerDistinguishedName); |
1374 |
| - */ |
| 1372 | + IssuerDistinguishedName = ConfigurationManager.AppSettings["issuerDistinguishedName"]; |
| 1373 | + CheckIfLoaded(IssuerDistinguishedName); |
| 1374 | + */ |
1375 | 1375 | }
|
1376 | 1376 |
|
1377 | 1377 | /// <summary>
|
|
0 commit comments