Skip to content

Commit

Permalink
Adds token name constant
Browse files Browse the repository at this point in the history
  • Loading branch information
gislikonrad committed Aug 23, 2023
1 parent e757fea commit d49a05d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public async Task<FinishSsoResult> FinishSsoAsync(HttpContext context)

var authn = new AuthenticationToken
{
Name = "saml2",
Name = Saml2pConstants.TokenName,
Value = validateContext.Response.XmlSecurityToken
};
properties.StoreTokens(new[] { authn });
Expand Down
6 changes: 6 additions & 0 deletions src/Solid.Identity.Protocols.Saml2p/Saml2pConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.AspNetCore.Authentication;

namespace Solid.Identity.Protocols.Saml2p
{
Expand All @@ -10,6 +11,11 @@ namespace Solid.Identity.Protocols.Saml2p
/// </summary>
public static class Saml2pConstants
{
/// <summary>
/// The name of the token that is stored in <see cref="AuthenticationProperties"/>.
/// </summary>
public const string TokenName = "saml2";

internal const string DateTimeFormat = "yyyy-MM-ddTHH:mm:ss.fffZ";

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

0 comments on commit d49a05d

Please sign in to comment.