mirror of https://github.com/boxyhq/jackson.git
renamed route
This commit is contained in:
parent
c40d87ee31
commit
584fb4a3e9
|
@ -26,8 +26,8 @@ module.exports = {
|
|||
destination: '/api/well-known/openid-configuration',
|
||||
},
|
||||
{
|
||||
source: '/.well-known/saml-metadata',
|
||||
destination: '/api/well-known/saml-metadata',
|
||||
source: '/.well-known/sp-metadata',
|
||||
destination: '/api/well-known/sp-metadata',
|
||||
},
|
||||
{
|
||||
source: '/.well-known/saml-configuration',
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import type { NextApiRequest, NextApiResponse } from 'next';
|
||||
import jackson from '@lib/jackson';
|
||||
import xmlbuilder from 'xmlbuilder';
|
||||
import saml from '@boxyhq/saml20';
|
||||
|
||||
const createSSOMetadataXML = async ({
|
||||
entityId,
|
||||
|
@ -14,11 +13,13 @@ const createSSOMetadataXML = async ({
|
|||
}): Promise<string> => {
|
||||
// certificate = saml.stripCertHeaderAndFooter(certificate);
|
||||
|
||||
const today = new Date();
|
||||
|
||||
const nodes = {
|
||||
EntityDescriptor: {
|
||||
'@xmlns:md': 'urn:oasis:names:tc:SAML:2.0:metadata',
|
||||
'@entityID': entityId,
|
||||
'@validUntil': '2026-06-22T18:39:53.000Z', // TODO: fix date
|
||||
'@validUntil': new Date(today.setFullYear(today.getFullYear() + 10)).toISOString(),
|
||||
SPSSODescriptor: {
|
||||
//'@WantAuthnRequestsSigned': true,
|
||||
'@protocolSupportEnumeration': 'urn:oasis:names:tc:SAML:2.0:protocol',
|
Loading…
Reference in New Issue