This repository has been archived by the owner on Nov 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fixes #30] Updated UID generation in DefaultClaimUidExtractor
- Loading branch information
1 parent
ac107b5
commit 220479c
Showing
5 changed files
with
298 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
src/Microsoft.AspNetCore.Antiforgery/Internal/IClaimUidExtractor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System.Collections.Generic; | ||
using System.Security.Claims; | ||
|
||
namespace Microsoft.AspNetCore.Antiforgery.Internal | ||
{ | ||
/// <summary> | ||
/// This interface can extract unique identifers for a claims-based identity. | ||
/// This interface can extract unique identifers for a <see cref="ClaimsPrincipal"/>. | ||
/// </summary> | ||
public interface IClaimUidExtractor | ||
{ | ||
/// <summary> | ||
/// Extracts claims identifier. | ||
/// </summary> | ||
/// <param name="identity">The <see cref="ClaimsIdentity"/>.</param> | ||
/// <param name="claimsPrincipal">The <see cref="ClaimsPrincipal"/>.</param> | ||
/// <returns>The claims identifier.</returns> | ||
string ExtractClaimUid(ClaimsIdentity identity); | ||
string ExtractClaimUid(ClaimsPrincipal claimsPrincipal); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.