first
This commit is contained in:
commit
5aa7d034f7
3292 changed files with 465160 additions and 0 deletions
BIN
data/web/api/favicon-16x16.png
Executable file
BIN
data/web/api/favicon-16x16.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 665 B |
BIN
data/web/api/favicon-32x32.png
Executable file
BIN
data/web/api/favicon-32x32.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 628 B |
16
data/web/api/index.css
Executable file
16
data/web/api/index.css
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
html {
|
||||
box-sizing: border-box;
|
||||
overflow: -moz-scrollbars-vertical;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background: #fafafa;
|
||||
}
|
||||
19
data/web/api/index.html
Executable file
19
data/web/api/index.html
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
<!-- HTML for static distribution bundle build -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Swagger UI</title>
|
||||
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" />
|
||||
<link rel="stylesheet" type="text/css" href="index.css" />
|
||||
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
|
||||
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="swagger-ui"></div>
|
||||
<script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
|
||||
<script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
|
||||
<script src="./swagger-initializer.js" charset="UTF-8"> </script>
|
||||
</body>
|
||||
</html>
|
||||
79
data/web/api/oauth2-redirect.html
Executable file
79
data/web/api/oauth2-redirect.html
Executable file
|
|
@ -0,0 +1,79 @@
|
|||
<!doctype html>
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<title>Swagger UI: OAuth2 Redirect</title>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
'use strict';
|
||||
function run () {
|
||||
var oauth2 = window.opener.swaggerUIRedirectOauth2;
|
||||
var sentState = oauth2.state;
|
||||
var redirectUrl = oauth2.redirectUrl;
|
||||
var isValid, qp, arr;
|
||||
|
||||
if (/code|token|error/.test(window.location.hash)) {
|
||||
qp = window.location.hash.substring(1).replace('?', '&');
|
||||
} else {
|
||||
qp = location.search.substring(1);
|
||||
}
|
||||
|
||||
arr = qp.split("&");
|
||||
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';});
|
||||
qp = qp ? JSON.parse('{' + arr.join() + '}',
|
||||
function (key, value) {
|
||||
return key === "" ? value : decodeURIComponent(value);
|
||||
}
|
||||
) : {};
|
||||
|
||||
isValid = qp.state === sentState;
|
||||
|
||||
if ((
|
||||
oauth2.auth.schema.get("flow") === "accessCode" ||
|
||||
oauth2.auth.schema.get("flow") === "authorizationCode" ||
|
||||
oauth2.auth.schema.get("flow") === "authorization_code"
|
||||
) && !oauth2.auth.code) {
|
||||
if (!isValid) {
|
||||
oauth2.errCb({
|
||||
authId: oauth2.auth.name,
|
||||
source: "auth",
|
||||
level: "warning",
|
||||
message: "Authorization may be unsafe, passed state was changed in server. The passed state wasn't returned from auth server."
|
||||
});
|
||||
}
|
||||
|
||||
if (qp.code) {
|
||||
delete oauth2.state;
|
||||
oauth2.auth.code = qp.code;
|
||||
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
|
||||
} else {
|
||||
let oauthErrorMsg;
|
||||
if (qp.error) {
|
||||
oauthErrorMsg = "["+qp.error+"]: " +
|
||||
(qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
|
||||
(qp.error_uri ? "More info: "+qp.error_uri : "");
|
||||
}
|
||||
|
||||
oauth2.errCb({
|
||||
authId: oauth2.auth.name,
|
||||
source: "auth",
|
||||
level: "error",
|
||||
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server."
|
||||
});
|
||||
}
|
||||
} else {
|
||||
oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid, redirectUrl: redirectUrl});
|
||||
}
|
||||
window.close();
|
||||
}
|
||||
|
||||
if (document.readyState !== 'loading') {
|
||||
run();
|
||||
} else {
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
run();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
5889
data/web/api/openapi.yaml
Executable file
5889
data/web/api/openapi.yaml
Executable file
File diff suppressed because it is too large
Load diff
18
data/web/api/swagger-initializer.js
Executable file
18
data/web/api/swagger-initializer.js
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
window.onload = function() {
|
||||
// Begin Swagger UI call region
|
||||
window.ui = SwaggerUIBundle({
|
||||
urls: [{url: "/api/openapi.yaml", name: "mailcow API"}],
|
||||
dom_id: '#swagger-ui',
|
||||
deepLinking: true,
|
||||
presets: [
|
||||
SwaggerUIBundle.presets.apis,
|
||||
SwaggerUIStandalonePreset
|
||||
],
|
||||
plugins: [
|
||||
SwaggerUIBundle.plugins.DownloadUrl
|
||||
],
|
||||
layout: "StandaloneLayout"
|
||||
});
|
||||
// End Swagger UI call region
|
||||
|
||||
};
|
||||
3
data/web/api/swagger-ui-bundle.js
Executable file
3
data/web/api/swagger-ui-bundle.js
Executable file
File diff suppressed because one or more lines are too long
1
data/web/api/swagger-ui-bundle.js.map
Executable file
1
data/web/api/swagger-ui-bundle.js.map
Executable file
File diff suppressed because one or more lines are too long
3
data/web/api/swagger-ui-es-bundle-core.js
Executable file
3
data/web/api/swagger-ui-es-bundle-core.js
Executable file
File diff suppressed because one or more lines are too long
1
data/web/api/swagger-ui-es-bundle-core.js.map
Executable file
1
data/web/api/swagger-ui-es-bundle-core.js.map
Executable file
File diff suppressed because one or more lines are too long
3
data/web/api/swagger-ui-es-bundle.js
Executable file
3
data/web/api/swagger-ui-es-bundle.js
Executable file
File diff suppressed because one or more lines are too long
1
data/web/api/swagger-ui-es-bundle.js.map
Executable file
1
data/web/api/swagger-ui-es-bundle.js.map
Executable file
File diff suppressed because one or more lines are too long
3
data/web/api/swagger-ui-standalone-preset.js
Executable file
3
data/web/api/swagger-ui-standalone-preset.js
Executable file
File diff suppressed because one or more lines are too long
1
data/web/api/swagger-ui-standalone-preset.js.map
Executable file
1
data/web/api/swagger-ui-standalone-preset.js.map
Executable file
File diff suppressed because one or more lines are too long
3
data/web/api/swagger-ui.css
Executable file
3
data/web/api/swagger-ui.css
Executable file
File diff suppressed because one or more lines are too long
1
data/web/api/swagger-ui.css.map
Executable file
1
data/web/api/swagger-ui.css.map
Executable file
File diff suppressed because one or more lines are too long
2
data/web/api/swagger-ui.js
Executable file
2
data/web/api/swagger-ui.js
Executable file
File diff suppressed because one or more lines are too long
1
data/web/api/swagger-ui.js.map
Executable file
1
data/web/api/swagger-ui.js.map
Executable file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue