chore: create variables to hitphone integration and changelog
parent
5b0334c18b
commit
bc4efc299d
|
@ -0,0 +1,13 @@
|
||||||
|
# Requisitos
|
||||||
|
|
||||||
|
## Variáveis de Ambiente
|
||||||
|
|
||||||
|
- Definir as variáveis do Hitphone para possibilitar a integração:
|
||||||
|
```env
|
||||||
|
CLIENT_HITPHONE_JWT_ALGORITHM="RS256"
|
||||||
|
CLIENT_HITPHONE_JWT_AUDIENCE="http://localhost:5174"
|
||||||
|
CLIENT_HITPHONE_JWT_ISSUER="http://localhost:3000"
|
||||||
|
CLIENT_ID_HITPHONE="asdas"dadasd
|
||||||
|
CLIENT_HITPHONE_SERVICE_URL="http://localhost:3333"
|
||||||
|
CLIENT_HITPHONE_SERVICE_KEY="sadadasd"
|
||||||
|
```
|
|
@ -1,6 +1,20 @@
|
||||||
|
import { readFileSync } from "fs";
|
||||||
|
import path from "path";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
secret: process.env.JWT_SECRET || "mysecret",
|
secret: process.env.JWT_SECRET || "mysecret",
|
||||||
expiresIn: "15m",
|
expiresIn: "15m",
|
||||||
refreshSecret: process.env.JWT_REFRESH_SECRET || "myanothersecret",
|
refreshSecret: process.env.JWT_REFRESH_SECRET || "myanothersecret",
|
||||||
refreshExpiresIn: "7d"
|
refreshExpiresIn: "7d",
|
||||||
|
hitphone: {
|
||||||
|
jwtPublicKey: readFileSync(path.join(__dirname, "../../keys/jwtHITRS256.key.pub")),
|
||||||
|
jwtAlgorithm: process.env.CLIENT_HITPHONE_JWT_ALGORITHM || "RS256",
|
||||||
|
jwtAudience: process.env.CLIENT_HITPHONE_JWT_AUDIENCE || "AUDIENCE",
|
||||||
|
jwtIssuer: process.env.CLIENT_HITPHONE_JWT_ISSUER || "ISSUER",
|
||||||
|
teams: {
|
||||||
|
CLIENT_ID: process.env.CLIENT_ID_HITPHONE || "CLIENTID",
|
||||||
|
},
|
||||||
|
CLIENT_SERVICE_URL: process.env.CLIENT_HITPHONE_SERVICE_URL || "http://localhost:3333",
|
||||||
|
CLIENT_SERVICE_API_KEY: process.env.CLIENT_HITPHONE_SERVICE_KEY || "APIKEY",
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue