wip
This commit is contained in:
parent
a7910057a3
commit
6f1555777e
15
data/x509cert.txt
Normal file
15
data/x509cert.txt
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIICSjCCAbOgAwIBAgIBADANBgkqhkiG9w0BAQ0FADBCMQswCQYDVQQGEwJ1czEN
|
||||||
|
MAsGA1UECAwERGVtbzEPMA0GA1UECgwGQm94eUhRMRMwEQYDVQQDDApib3h5aHEu
|
||||||
|
Y29tMB4XDTIyMDExMzE3NTQ1NVoXDTIzMDExMzE3NTQ1NVowQjELMAkGA1UEBhMC
|
||||||
|
dXMxDTALBgNVBAgMBERlbW8xDzANBgNVBAoMBkJveHlIUTETMBEGA1UEAwwKYm94
|
||||||
|
eWhxLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA4lbyAVpXmp1bGPGn
|
||||||
|
PfauUzTvPil0gDJaGBTYQ50A7lDLrD0rh/SbsRY5e8VA2JnYaKT7k53FL4n9ogjx
|
||||||
|
HQRT4b7s9ZjUUC7BHYPd4CzATjf6Iy48bbout2VphuZdWjwbY1uEfolaZR2QU4IR
|
||||||
|
4RYfa4L4fGZufA8ayunCWXTackMCAwEAAaNQME4wHQYDVR0OBBYEFKk0NXw5l0fq
|
||||||
|
MQ3GW4mNzazrZeEQMB8GA1UdIwQYMBaAFKk0NXw5l0fqMQ3GW4mNzazrZeEQMAwG
|
||||||
|
A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQENBQADgYEABIL+uv5KbnqLnvbeyglcuDSf
|
||||||
|
MVlPqMlvvliPLZa2TGluutL3t+jFfJNi6Vavd4BNyVsCYRe/ab8+/nok1Lu/IqKF
|
||||||
|
vifu1QGHsF1vKyafmVC8cMX/lxsvjedsOs++59yOAHAgXn+0IuBwupinKF4Tuqd7
|
||||||
|
n5gl9V4czyfFtrJUCQc=
|
||||||
|
-----END CERTIFICATE-----
|
||||||
@ -1,4 +1,6 @@
|
|||||||
|
import { promises as fs } from 'fs';
|
||||||
import type { NextApiRequest, NextApiResponse } from 'next';
|
import type { NextApiRequest, NextApiResponse } from 'next';
|
||||||
|
import path from 'path';
|
||||||
import { metadata } from '../../../services';
|
import { metadata } from '../../../services';
|
||||||
import type { App, IdPMetadata } from '../../../types';
|
import type { App, IdPMetadata } from '../../../types';
|
||||||
|
|
||||||
@ -18,20 +20,11 @@ export default async function handler(
|
|||||||
description = null,
|
description = null,
|
||||||
} = req.body;
|
} = req.body;
|
||||||
|
|
||||||
const certificate = 'EwZHb29nbGUxGDAWBgNVBAsTD0dv';
|
const certificateFilePath = path.join('data', 'x509cert.txt');
|
||||||
|
const certificate = await fs.readFile(certificateFilePath, 'utf8');
|
||||||
|
|
||||||
return res
|
return res
|
||||||
.status(200)
|
.status(200)
|
||||||
.json(metadata.create(acs_url, entity_id, certificate));
|
.json(metadata.create(acs_url, entity_id, certificate));
|
||||||
|
|
||||||
// const app = await apps.create({
|
|
||||||
// acs_url,
|
|
||||||
// entity_id,
|
|
||||||
// name,
|
|
||||||
// description,
|
|
||||||
// certificate,
|
|
||||||
// });
|
|
||||||
|
|
||||||
// return res.status(200).json(app);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@ model App {
|
|||||||
name String
|
name String
|
||||||
description String?
|
description String?
|
||||||
certificate String
|
certificate String
|
||||||
sp_acs_url String
|
acs_url String
|
||||||
sp_entity_id String
|
entity_id String
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user