From 4662cd49d340268acdc42fde9d52b924dcb6e475 Mon Sep 17 00:00:00 2001 From: Austin Gebauer Date: Wed, 20 Dec 2023 14:42:32 -0800 Subject: [PATCH] saml: truncate issue instant to microseconds --- saml/authn_request.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/saml/authn_request.go b/saml/authn_request.go index 5abe961..cd30928 100644 --- a/saml/authn_request.go +++ b/saml/authn_request.go @@ -13,6 +13,7 @@ import ( "net/url" "strings" "text/template" + "time" "github.com/jonboulle/clockwork" @@ -201,7 +202,7 @@ func (sp *ServiceProvider) CreateAuthnRequest( ar.AssertionConsumerServiceURL = opts.assertionConsumerServiceURL } - ar.IssueInstant = opts.clock.Now().UTC() + ar.IssueInstant = opts.clock.Now().Truncate(time.Microsecond).UTC() ar.Destination = destination ar.Issuer = &core.Issuer{}