@oondemand/oon-core-back 0.3.23 → 0.3.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -4,7 +4,8 @@ O Core suporta `ecosystem.role` em `central.config.js`: `root` para a Central de
|
|
|
4
4
|
|
|
5
5
|
## Variáveis de ambiente
|
|
6
6
|
|
|
7
|
-
- `CENTRAL_ATIVACAO_URL`:
|
|
7
|
+
- `CENTRAL_ATIVACAO_URL`: URL pública/frontend da Central de Ativações.
|
|
8
|
+
- `CENTRAL_ATIVACAO_API_URL`: URL canônica do backend da Central de Ativações. Padrão: `https://central-ativacao.central.oondemand.online/api/`.
|
|
8
9
|
- `APP_CODE`: código do aplicativo no Ecossistema.
|
|
9
10
|
- `APP_ENVIRONMENT`: `desenvolvimento`, `homologacao` ou `producao`.
|
|
10
11
|
- `PUBLIC_APP_URL`: URL pública confirmada da Central.
|
|
@@ -12,6 +13,8 @@ O Core suporta `ecosystem.role` em `central.config.js`: `root` para a Central de
|
|
|
12
13
|
- `AUTH_PROVIDER_TIMEOUT_MS`: timeout das chamadas à Central de Ativações.
|
|
13
14
|
- `INSTANCE_HEARTBEAT_INTERVAL_MS`: intervalo planejado para sincronização/heartbeat.
|
|
14
15
|
|
|
16
|
+
Compatibilidade temporária: `CENTRAL_ATIVACAO_BACKEND_URL` e `MEUS_APPS_BACKEND_URL` continuam aceitas como aliases da URL da API. Nunca aponte a URL da API para o próprio Core.
|
|
17
|
+
|
|
15
18
|
## Fluxo
|
|
16
19
|
|
|
17
20
|
`GET /ativacao/status` informa estado sem segredos. `POST /ativacao/validar-codigo` valida sem consumir. `POST /ativacao/concluir` revalida, chama `/ativar`, criptografa imediatamente o token da instância, executa hooks declarativos, chama `/concluir` e marca a instância como `ativa`. `POST /ativacao/tentar-novamente` retoma uma ativação já registrada sem exigir novo código.
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ const ctx = require("../context");
|
|
|
4
4
|
const DEFAULT_CENTRAL_ATIVACAO_URL =
|
|
5
5
|
"https://central-ativacao.central.oondemand.online";
|
|
6
6
|
const DEFAULT_CENTRAL_ATIVACAO_API_URL =
|
|
7
|
-
"https://
|
|
7
|
+
"https://central-ativacao.central.oondemand.online/api/";
|
|
8
8
|
const LOGIN_PATH = "/integracao/autenticacao-aplicativos/autenticar";
|
|
9
9
|
const PERMISSION_PATH = "/integracao/autenticacao-aplicativos/verificar-permissao";
|
|
10
10
|
|
|
@@ -50,7 +50,7 @@ function assertNotSameHost(url, req) {
|
|
|
50
50
|
process.env.AUTH_ALLOW_SAME_HOST !== "true"
|
|
51
51
|
) {
|
|
52
52
|
throw new GenericError(
|
|
53
|
-
"
|
|
53
|
+
"CENTRAL_ATIVACAO_API_URL aponta para o próprio Core. Configure a API da Central de Ativações.",
|
|
54
54
|
{ statusCode: 500 },
|
|
55
55
|
);
|
|
56
56
|
}
|