mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-09 19:28:33 +00:00
Get all authorizations
This commit is contained in:
@@ -260,21 +260,23 @@ export const pkiAcmeServiceFactory = ({
|
|||||||
accountId: account.id,
|
accountId: account.id,
|
||||||
status: AcmeOrderStatus.Pending
|
status: AcmeOrderStatus.Pending
|
||||||
});
|
});
|
||||||
payload.identifiers.forEach(async (identifier) => {
|
const authorizations = await Promise.all(
|
||||||
if (identifier.type === AcmeIdentifierType.DNS) {
|
payload.identifiers.map(async (identifier) => {
|
||||||
// TODO: reuse existing authorizations for this identifier if they exist
|
if (identifier.type === AcmeIdentifierType.DNS) {
|
||||||
const auth = await acmeAuthDAL.create({
|
// TODO: reuse existing authorizations for this identifier if they exist
|
||||||
accountId: account.id,
|
return await acmeAuthDAL.create({
|
||||||
status: AcmeAuthStatus.Pending,
|
accountId: account.id,
|
||||||
identifierType: identifier.type,
|
status: AcmeAuthStatus.Pending,
|
||||||
identifierValue: identifier.value,
|
identifierType: identifier.type,
|
||||||
// TODO: read config from the profile to get the expiration time instead
|
identifierValue: identifier.value,
|
||||||
expiresAt: new Date(Date.now() + 24 * 60 * 60 * 1000)
|
// TODO: read config from the profile to get the expiration time instead
|
||||||
});
|
expiresAt: new Date(Date.now() + 24 * 60 * 60 * 1000)
|
||||||
} else {
|
});
|
||||||
throw new AcmeMalformedError({ detail: "Only DNS identifiers are supported" });
|
} else {
|
||||||
}
|
throw new AcmeMalformedError({ detail: "Only DNS identifiers are supported" });
|
||||||
});
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
// FIXME: Implement ACME new order creation
|
// FIXME: Implement ACME new order creation
|
||||||
const orderId = "FIXME-order-id";
|
const orderId = "FIXME-order-id";
|
||||||
|
|||||||
Reference in New Issue
Block a user