OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
API
/
swagger-ui-5.17.14
/
docker
/
configurator
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/07/2024 04:33:47 AM
rwxr-xr-x
📄
helpers.js
271 bytes
08/07/2024 04:33:47 AM
rw-r--r--
📄
index.js
2.08 KB
08/07/2024 04:33:47 AM
rw-r--r--
📄
oauth.js
1.13 KB
08/07/2024 04:33:47 AM
rw-r--r--
📄
translator.js
2.48 KB
08/07/2024 04:33:47 AM
rw-r--r--
📄
variables.js
2.23 KB
08/07/2024 04:33:47 AM
rw-r--r--
Editing: oauth.js
Close
const translator = require("./translator") const indent = require("./helpers").indent const oauthBlockSchema = { OAUTH_CLIENT_ID: { type: "string", name: "clientId" }, OAUTH_CLIENT_SECRET: { type: "string", name: "clientSecret", onFound: () => console.warn("Swagger UI warning: don't use `OAUTH_CLIENT_SECRET` in production!") }, OAUTH_REALM: { type: "string", name: "realm" }, OAUTH_APP_NAME: { type: "string", name: "appName" }, OAUTH_SCOPE_SEPARATOR: { type: "string", name: "scopeSeparator" }, OAUTH_SCOPES: { type: "string", name: "scopes" }, OAUTH_ADDITIONAL_PARAMS: { type: "object", name: "additionalQueryStringParams" }, OAUTH_USE_BASIC_AUTH: { type: "boolean", name: "useBasicAuthenticationWithAccessCodeGrant" }, OAUTH_USE_PKCE: { type: "boolean", name: "usePkceWithAuthorizationCodeGrant" } } module.exports = function oauthBlockBuilder(env) { const translatorResult = translator(env, { schema: oauthBlockSchema }) if(translatorResult) { return ( `ui.initOAuth({ ${indent(translatorResult, 2)} })`) } return `` }