Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Commit d49a05d

Browse files
committed
Adds token name constant
1 parent e757fea commit d49a05d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/Solid.Identity.Protocols.Saml2p/Middleware/Sp/FinishSsoEndpointMiddleware.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public async Task<FinishSsoResult> FinishSsoAsync(HttpContext context)
174174

175175
var authn = new AuthenticationToken
176176
{
177-
Name = "saml2",
177+
Name = Saml2pConstants.TokenName,
178178
Value = validateContext.Response.XmlSecurityToken
179179
};
180180
properties.StoreTokens(new[] { authn });

src/Solid.Identity.Protocols.Saml2p/Saml2pConstants.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System;
33
using System.Collections.Generic;
44
using System.Text;
5+
using Microsoft.AspNetCore.Authentication;
56

67
namespace Solid.Identity.Protocols.Saml2p
78
{
@@ -10,6 +11,11 @@ namespace Solid.Identity.Protocols.Saml2p
1011
/// </summary>
1112
public static class Saml2pConstants
1213
{
14+
/// <summary>
15+
/// The name of the token that is stored in <see cref="AuthenticationProperties"/>.
16+
/// </summary>
17+
public const string TokenName = "saml2";
18+
1319
internal const string DateTimeFormat = "yyyy-MM-ddTHH:mm:ss.fffZ";
1420

1521
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member

0 commit comments

Comments
 (0)