Skip to content

Commit 04f1f51

Browse files
committed
SecurityTokenValidFrom gives an exception
1 parent 41be442 commit 04f1f51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ITfoxtec.Identity.Saml2/Request/Saml2AuthnResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class Saml2AuthnResponse : Saml2Response
4343
/// <summary>
4444
/// Gets the first instant in time at which this security token is valid.
4545
/// </summary>
46-
public DateTimeOffset SecurityTokenValidFrom { get { return Saml2SecurityToken.ValidFrom; } }
46+
public DateTimeOffset SecurityTokenValidFrom { get { return Saml2SecurityToken.ValidFrom > DateTime.MinValue ? Saml2SecurityToken.ValidFrom : DateTime.UtcNow; } }
4747

4848
/// <summary>
4949
/// Gets the last instant in time at which this security token is valid.

0 commit comments

Comments
 (0)