dynamic validUntil date (10 years validity)
This commit is contained in:
parent
c5ab7761d1
commit
73f45a6f92
@ -12,11 +12,12 @@ const createIdPMetadataXML = async ({
|
|||||||
}): Promise<string> => {
|
}): Promise<string> => {
|
||||||
certificate = saml.stripCertHeaderAndFooter(certificate);
|
certificate = saml.stripCertHeaderAndFooter(certificate);
|
||||||
|
|
||||||
|
const today = new Date();
|
||||||
const nodes = {
|
const nodes = {
|
||||||
EntityDescriptor: {
|
EntityDescriptor: {
|
||||||
'@xmlns:md': 'urn:oasis:names:tc:SAML:2.0:metadata',
|
'@xmlns:md': 'urn:oasis:names:tc:SAML:2.0:metadata',
|
||||||
'@entityID': idpEntityId,
|
'@entityID': idpEntityId,
|
||||||
'@validUntil': '2026-06-22T18:39:53.000Z',
|
'@validUntil': new Date(today.setFullYear(today.getFullYear() + 10)).toISOString(),
|
||||||
IDPSSODescriptor: {
|
IDPSSODescriptor: {
|
||||||
'@WantAuthnRequestsSigned': false,
|
'@WantAuthnRequestsSigned': false,
|
||||||
'@protocolSupportEnumeration': 'urn:oasis:names:tc:SAML:2.0:protocol',
|
'@protocolSupportEnumeration': 'urn:oasis:names:tc:SAML:2.0:protocol',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user