Compare commits
9 Commits
new-ui-and
...
1.2.3
Author | SHA1 | Date | |
---|---|---|---|
8d3b788657 | |||
36304b8873 | |||
9234efab2a | |||
6bcda75634 | |||
dd39ece408 | |||
cc1696a429 | |||
b68fa6f223 | |||
3718a1d55c | |||
80aace7b72 |
@ -1,3 +0,0 @@
|
||||
{
|
||||
"url": "https://drone.hibas123.de/OpenServer/OpenAuth_server/"
|
||||
}
|
21
.drone.yml
21
.drone.yml
@ -1,21 +0,0 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: Build docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
auto_tag: true
|
||||
repo: docker.hibas123.de/authserver
|
||||
registry: docker.hibas123.de
|
||||
debug: true
|
||||
when:
|
||||
branch: [master]
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
37
.github/workflows/ci.yml
vendored
Normal file
37
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
# .github/workflows/ci.yml
|
||||
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
MY_DOCKER_USERNAME: ${{ secrets.MY_DOCKER_USERNAME }}
|
||||
MY_DOCKER_PASSWORD: ${{ secrets.MY_DOCKER_PASSWORD }}
|
||||
FORCE_COLOR: 1
|
||||
steps:
|
||||
- uses: https://github.com/earthly/actions-setup@v1
|
||||
with:
|
||||
version: v0.7.20
|
||||
- uses: actions/checkout@v2
|
||||
- name: Put back the git branch into git (Earthly uses it for tagging)
|
||||
run: |
|
||||
branch=""
|
||||
if [ -n "$GITHUB_HEAD_REF" ]; then
|
||||
branch="$GITHUB_HEAD_REF"
|
||||
else
|
||||
branch="${GITHUB_REF##*/}"
|
||||
fi
|
||||
git checkout -b "$branch" || true
|
||||
- name: Docker Login
|
||||
run: docker login git.hibas.dev --username "$MY_DOCKER_USERNAME" --password "$MY_DOCKER_PASSWORD"
|
||||
- name: Earthly version
|
||||
run: earthly --version
|
||||
- name: Run build
|
||||
run: earthly --push +docker-multi
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -12,4 +12,4 @@ config.ini
|
||||
doc/
|
||||
|
||||
.yarn/cache
|
||||
.yarn/install-state.gz
|
||||
.yarn/install-state.gz
|
1
Backend/.dockerignore
Normal file
1
Backend/.dockerignore
Normal file
@ -0,0 +1 @@
|
||||
config.ini
|
@ -18,7 +18,7 @@ export default class AccountService extends Server.AccountService<SessionContext
|
||||
id: ctx.user.uid,
|
||||
username: ctx.user.username,
|
||||
name: ctx.user.name,
|
||||
birthday: ctx.user.birthday.valueOf(),
|
||||
birthday: ctx.user.birthday?.valueOf(),
|
||||
gender: ctx.user.gender as number as Gender,
|
||||
}
|
||||
}
|
||||
|
@ -1,25 +1,38 @@
|
||||
import Mail from "../../models/mail";
|
||||
import { GetClientApiAuthMiddleware } from "../middlewares/client";
|
||||
import Stacker from "../middlewares/stacker";
|
||||
import { Request, Response } from "express";
|
||||
|
||||
export default Stacker(GetClientApiAuthMiddleware(), async (req: Request, res) => {
|
||||
let mails = await Promise.all(
|
||||
req.user.mails.map((id) => Mail.findById(id))
|
||||
);
|
||||
|
||||
let mail = mails.find((e) => e.primary) || mails[0];
|
||||
|
||||
res.json({
|
||||
user_id: req.user.uid,
|
||||
id: req.user.uid,
|
||||
ID: req.user.uid,
|
||||
sub: req.user.uid,
|
||||
email: mail.mail,
|
||||
username: req.user.username,
|
||||
displayName: req.user.name,
|
||||
"display-name": req.user.name,
|
||||
displayNameClaim: req.user.name,
|
||||
name: req.user.name,
|
||||
});
|
||||
})
|
||||
import Mail from "../../models/mail";
|
||||
import { GetClientApiAuthMiddleware } from "../middlewares/client";
|
||||
import Stacker from "../middlewares/stacker";
|
||||
import { Request, Response } from "express";
|
||||
import Logging from "@hibas123/nodelogging";
|
||||
|
||||
export default Stacker(GetClientApiAuthMiddleware(), async (req: Request, res) => {
|
||||
const mode = req.query.mode;
|
||||
let mails = await Promise.all(
|
||||
req.user.mails.map((id) => Mail.findById(id))
|
||||
);
|
||||
|
||||
let mail = mails.find((e) => e.primary) || mails[0];
|
||||
|
||||
let base_response = {
|
||||
user_id: req.user.uid,
|
||||
id: req.user.uid,
|
||||
ID: req.user.uid,
|
||||
sub: req.user.uid,
|
||||
email: mail.mail,
|
||||
username: req.user.username,
|
||||
displayName: req.user.name,
|
||||
displayNameClaim: req.user.name,
|
||||
}
|
||||
|
||||
if (mode == "nextcloud") {
|
||||
Logging.debug("Profile in Nextcloud mode");
|
||||
base_response["ocs"] = {
|
||||
data: {
|
||||
id: base_response.user_id,
|
||||
email: base_response.email,
|
||||
"display-name": base_response.displayName,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
res.json(base_response);
|
||||
})
|
||||
|
@ -10,6 +10,8 @@ dotenv.config();
|
||||
export interface DatabaseConfig {
|
||||
host: string;
|
||||
database: string;
|
||||
username?: string;
|
||||
password?: string;
|
||||
}
|
||||
|
||||
export interface WebConfig {
|
||||
@ -57,6 +59,14 @@ const config = (parse(
|
||||
type: String,
|
||||
default: "localhost",
|
||||
},
|
||||
username: {
|
||||
type: String,
|
||||
optional: true,
|
||||
},
|
||||
password: {
|
||||
type: String,
|
||||
optional: true,
|
||||
},
|
||||
},
|
||||
web: {
|
||||
port: {
|
||||
|
@ -7,7 +7,16 @@ if (Config.database) {
|
||||
if (Config.database.host) host = Config.database.host;
|
||||
}
|
||||
if (Config.core.dev) dbname += "_dev";
|
||||
const DB = new SafeMongo("mongodb://" + host, dbname, {
|
||||
|
||||
let auth = undefined;
|
||||
if (Config.database.username) {
|
||||
auth = {
|
||||
username: Config.database.username,
|
||||
password: Config.database.password
|
||||
}
|
||||
}
|
||||
|
||||
const DB = new SafeMongo("mongodb://" + host, dbname, {
|
||||
auth
|
||||
});
|
||||
export default DB;
|
||||
|
@ -26,6 +26,7 @@ export default class Web {
|
||||
|
||||
constructor(config: WebConfig) {
|
||||
this.server = express();
|
||||
this.server.set("trust proxy", 1);
|
||||
this.port = Number(config.port);
|
||||
this.registerMiddleware();
|
||||
this.registerUserSession();
|
||||
|
41
Earthfile
Normal file
41
Earthfile
Normal file
@ -0,0 +1,41 @@
|
||||
VERSION 0.7
|
||||
FROM node:20-alpine3.18
|
||||
WORKDIR /build
|
||||
|
||||
project:
|
||||
COPY . .
|
||||
RUN yarn install
|
||||
|
||||
build:
|
||||
FROM +project
|
||||
|
||||
RUN yarn build
|
||||
|
||||
SAVE ARTIFACT /build/_API /API
|
||||
SAVE ARTIFACT /build/Backend/lib /Backend
|
||||
SAVE ARTIFACT /build/Frontend/build /Frontend
|
||||
SAVE ARTIFACT /build/FrontendLegacy/out /FrontendLegacy
|
||||
|
||||
docker-multi:
|
||||
BUILD +build
|
||||
BUILD --platform linux/amd64 --platform linux/arm64 +docker
|
||||
|
||||
docker:
|
||||
FROM +project
|
||||
|
||||
# RUN apk add --no-cache caddy supervisor
|
||||
|
||||
# COPY ./supervisord.conf /etc/supervisord.conf
|
||||
|
||||
COPY +build/API /build/_API
|
||||
COPY +build/Backend /build/Backend/lib
|
||||
COPY +build/Frontend /build/Frontend/build
|
||||
COPY +build/FrontendLegacy /build/FrontendLegacy/out
|
||||
|
||||
WORKDIR /build/Backend
|
||||
|
||||
ENTRYPOINT ["node", "lib/index.js"]
|
||||
|
||||
ARG EARTHLY_TARGET_TAG
|
||||
ARG TAG=$EARTHLY_TARGET_TAG
|
||||
SAVE IMAGE --push git.hibas.dev/openserver/openauth:$TAG
|
@ -2,23 +2,31 @@
|
||||
"name": "@hibas123/openauth-views-v2",
|
||||
"main": "index.js",
|
||||
"devDependencies": {
|
||||
"@hibas123/openauth-internalapi": "workspace:^",
|
||||
"@hibas123/theme": "^2.0.6",
|
||||
"@hibas123/utils": "^2.2.18",
|
||||
"@popperjs/core": "^2.11.7",
|
||||
"@rollup/plugin-commonjs": "^24.0.1",
|
||||
"@rollup/plugin-html": "^1.0.2",
|
||||
"@rollup/plugin-image": "^3.0.2",
|
||||
"@rollup/plugin-node-resolve": "^15.0.2",
|
||||
"@simplewebauthn/browser": "^7.2.0",
|
||||
"@tsconfig/svelte": "^4.0.1",
|
||||
"@types/cleave.js": "^1.4.7",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"classnames": "^2.3.2",
|
||||
"cleave.js": "^1.6.0",
|
||||
"cssnano": "^6.0.0",
|
||||
"esbuild": "^0.17.16",
|
||||
"flowbite": "^1.6.5",
|
||||
"flowbite-svelte": "^0.34.9",
|
||||
"joi": "^17.9.1",
|
||||
"postcss": "^8.4.21",
|
||||
"postcss-import": "^15.1.0",
|
||||
"postcss-url": "^10.1.3",
|
||||
"rollup": "^3.20.2",
|
||||
"rollup-plugin-esbuild": "^5.0.0",
|
||||
"rollup-plugin-hash": "^1.3.0",
|
||||
"rollup-plugin-livereload": "^2.0.5",
|
||||
"rollup-plugin-postcss": "^4.0.2",
|
||||
"rollup-plugin-sizes": "^1.0.5",
|
||||
@ -27,21 +35,12 @@
|
||||
"svelte": "^3.58.0",
|
||||
"svelte-preprocess": "^5.0.3",
|
||||
"tailwindcss": "^3.3.1",
|
||||
"typescript": "^5.0.4"
|
||||
"typescript": "^5.0.4",
|
||||
"what-the-pack": "^2.0.3"
|
||||
},
|
||||
"scripts": {
|
||||
"prepublishOnly": "npm run build",
|
||||
"build": "rollup -c rollup.config.mjs ",
|
||||
"dev": "rollup -c rollup.config.mjs -w"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hibas123/openauth-internalapi": "workspace:^",
|
||||
"@hibas123/theme": "^2.0.6",
|
||||
"@hibas123/utils": "^2.2.18",
|
||||
"@rollup/plugin-commonjs": "^24.0.1",
|
||||
"@simplewebauthn/browser": "^7.2.0",
|
||||
"cleave.js": "^1.6.0",
|
||||
"joi": "^17.9.1",
|
||||
"what-the-pack": "^2.0.3"
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,6 @@ module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
cssnano: {},
|
||||
// cssnano: {},
|
||||
},
|
||||
};
|
||||
|
@ -9,6 +9,7 @@ import postcss from "rollup-plugin-postcss";
|
||||
import livereload from "rollup-plugin-livereload";
|
||||
import sveltePreprocess from "svelte-preprocess";
|
||||
import commonjs from "@rollup/plugin-commonjs";
|
||||
import hash from "rollup-plugin-hash";
|
||||
|
||||
const VIEWS = ["home", "login", "popup", "user"];
|
||||
|
||||
@ -27,9 +28,14 @@ const htmlTemplate = ({ attributes, meta, files, publicPath, title }) => {
|
||||
""
|
||||
);
|
||||
};
|
||||
|
||||
let bundle_name = "";
|
||||
const scripts = (files.js || [])
|
||||
.map(({ fileName }) => {
|
||||
const attrs = makeHtmlAttributes(attributes.script);
|
||||
if (fileName.startsWith("bundle.")) {
|
||||
bundle_name = fileName;
|
||||
}
|
||||
return `<script src="${publicPath}${fileName}"${attrs}></script>`;
|
||||
})
|
||||
.join("\n");
|
||||
@ -54,8 +60,7 @@ const htmlTemplate = ({ attributes, meta, files, publicPath, title }) => {
|
||||
<head>
|
||||
${metas}
|
||||
<title>${title}</title>
|
||||
<link rel="stylesheet" href="bundle.css"/>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto"/>
|
||||
<link rel="stylesheet" href="${bundle_name.slice(0, -2)}css"/>
|
||||
${links}
|
||||
</head>
|
||||
<body>
|
||||
@ -66,14 +71,13 @@ const htmlTemplate = ({ attributes, meta, files, publicPath, title }) => {
|
||||
|
||||
export default VIEWS.map((view) => ({
|
||||
input: `src/pages/${view}/main.ts`,
|
||||
output: [
|
||||
{
|
||||
file: `build/${view}/bundle.min.js`,
|
||||
format: "es",
|
||||
sourcemap: true,
|
||||
name: view,
|
||||
},
|
||||
],
|
||||
output: {
|
||||
dir: `build/${view}`,
|
||||
entryFileNames: `bundle.[hash].min.js`,
|
||||
format: "es",
|
||||
sourcemap: true,
|
||||
name: view,
|
||||
},
|
||||
plugins: [
|
||||
svelte({
|
||||
emitCss: true,
|
||||
@ -106,9 +110,12 @@ export default VIEWS.map((view) => ({
|
||||
title: `Rullup bundle for ${view}`,
|
||||
}),
|
||||
postcss({
|
||||
extract: `bundle.css`, //TODO: Check if it should be enabled
|
||||
extract: true, // `bundle.css`, //TODO: Check if it should be enabled
|
||||
// inject: true,
|
||||
}),
|
||||
hash({
|
||||
dest: "bundle.[hash].min.js",
|
||||
}),
|
||||
// dev && livereload(),
|
||||
],
|
||||
}));
|
||||
|
@ -9,7 +9,7 @@
|
||||
let code: string = "";
|
||||
|
||||
function send() {
|
||||
loginState.useTOTP(id, code);
|
||||
loginState.useTOTP(id, code.replace(/\s+/g, ""));
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
verifingTOTP = true;
|
||||
verifyError = undefined;
|
||||
try {
|
||||
await InternalAPI.TwoFactor.VerifyTOTP(totp.id, code);
|
||||
await InternalAPI.TwoFactor.VerifyTOTP(totp.id, code.replace(/\s/g, ""));
|
||||
stage = "done";
|
||||
dispatch("reload");
|
||||
} catch (err) {
|
||||
|
1
FrontendLegacy/.gitignore
vendored
Normal file
1
FrontendLegacy/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
out/
|
@ -1,484 +0,0 @@
|
||||
<html><head><title>{{i18n "Administration"}}</title><meta charset=utf8 /><meta name=viewport content="width=device-width,initial-scale=1"/><script src=https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js type=text/javascript></script><script src=https://unpkg.com/popper.js@1.12.6/dist/umd/popper.js type=text/javascript></script><script src=https://unpkg.com/bootstrap-material-design@4.1.1/dist/js/bootstrap-material-design.js type=text/javascript></script><script src=https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.11/handlebars.min.js type=text/javascript></script><script>$(document).ready(() => $('body').bootstrapMaterialDesign())</script><style>@import"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons";@import"https://unpkg.com/bootstrap-material-design@4.1.1/dist/css/bootstrap-material-design.min.css";.btn-primary{color:#fff !important;background-color:#1e88e5 !important}.error_card{color:#ff2f00;padding:1rem;font-size:1rem}.bg-primary{background-color:#1e88e5 !important}.spinner{-webkit-animation:rotation 1.35s linear infinite;animation:rotation 1.35s linear infinite;stroke:#1e88e5}@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}}@keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}}.circle{stroke-dasharray:180;stroke-dashoffset:0;-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center;-webkit-animation:turn 1.35s ease-in-out infinite;animation:turn 1.35s ease-in-out infinite}@-webkit-keyframes turn{0%{stroke-dashoffset:180}50%{stroke-dashoffset:45;-webkit-transform:rotate(135deg);transform:rotate(135deg)}100%{stroke-dashoffset:180;-webkit-transform:rotate(450deg);transform:rotate(450deg)}}@keyframes turn{0%{stroke-dashoffset:180}50%{stroke-dashoffset:45;-webkit-transform:rotate(135deg);transform:rotate(135deg)}100%{stroke-dashoffset:180;-webkit-transform:rotate(450deg);transform:rotate(450deg)}}header{margin-bottom:8px;padding:8px 16px;padding-bottom:0}table{word-wrap:break-word;table-layout:fixed}table td{vertical-align:inherit !important;width:auto}.col.form-group{padding-left:0 !important;margin-left:5px !important}</style></head><body><header class=bg-primary style="display: flex; justify-content: space-between;"><h3 style="display: inline">{{appname}} {{i18n "Administration"}} <span id=sitename>LOADING</span></h3><ul class="nav nav-tabs" style="display: inline-block; margin-left: auto; margin-top: -8px;"><li class="nav-item dropdown"><a class="nav-link dropdown-toggle" data-toggle=dropdown href=# role=button aria-haspopup=true aria-expanded=false>Model</a><div class=dropdown-menu><a class=dropdown-item href="?type=user">User</a> <a class=dropdown-item href="?type=regcode">RegCode</a> <a class=dropdown-item href="?type=client">Client</a></div></li></ul></header><div id=content><div class=container><div id=error_cont class=row style="margin-bottom: 24px;display: none;"><div class=col-sm><div class="card error_card"><div id=error_msg class=card-body></div></div></div></div><div id=custom_data_cont class=row style="margin-bottom: 24px; display: none"><div class=col-sm><div class=card><div id=custom_data class=card-body></div></div></div></div><div class=row><div class=col-sm><div class=card><div class=card-body><div id=table-body><div style="width: 65px; height: 65px; margin: 0 auto;"><svg class=spinner viewBox="0 0 66 66" xmlns=http://www.w3.org/2000/svg><circle class=circle fill=none stroke-width=6 stroke-linecap=round cx=33 cy=33 r=30></circle></svg></div></div></div></div></div></div></div></div><script id=template-spinner type=text/x-handlebars-template><div style="width: 65px; height: 65px; margin: 0 auto;">
|
||||
<svg class="spinner" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle class="circle" fill="none" stroke-width="6" stroke-linecap="round" cx="33" cy="33" r="30"></circle>
|
||||
</svg>
|
||||
</div></script><script id=template-user-list type=text/x-handlebars-template><table class="table table-bordered" style="margin-bottom: 0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Username</th>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Gender</th>
|
||||
<th scope="col">Role</th>
|
||||
<th scope="col" style="width: 2.5rem"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
\{{#users}}
|
||||
<tr>
|
||||
<td>\{{ username }}</td>
|
||||
<td>\{{ name }}</td>
|
||||
|
||||
<!-- ToDo: Make helper to resolve number to human readaby text-->
|
||||
<td>\{{humangender gender}}</td>
|
||||
|
||||
<td onclick="userOnChangeType('\{{_id}}')">
|
||||
\{{#if admin}}
|
||||
<span class="badge badge-danger">Admin</span>
|
||||
\{{else}}
|
||||
<span class="badge badge-success">User</span>
|
||||
\{{/if}}
|
||||
</td>
|
||||
<td style="padding: 0.25em">
|
||||
<button style="border: 0; background-color: rgba(0, 0, 0, 0); padding: 0; text-align: center;" onclick="deleteUser('\{{_id}}')">
|
||||
<i class="material-icons" style="font-size: 2rem; display: inline">
|
||||
delete
|
||||
</i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
\{{/users}}
|
||||
</tbody>
|
||||
</table></script><script id=template-regcode-list type=text/x-handlebars-template><button class="btn btn-raised btn-primary" onclick="createRegcode()">Create</button>
|
||||
<table class="table table-bordered" style="margin-bottom: 0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Code</th>
|
||||
<th scope="col">Valid</th>
|
||||
<th scope="col">Till</th>
|
||||
<th scope="col" style="width: 2.5rem"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
\{{#regcodes}}
|
||||
<tr>
|
||||
<td>\{{ token }}</td>
|
||||
<td>\{{ valid }}</td>
|
||||
|
||||
<!-- ToDo: Make helper to resolve number to human readaby text-->
|
||||
<td>\{{formatDate validTill }}</td>
|
||||
<td style="padding: 0.25em">
|
||||
<button style="border: 0; background-color: rgba(0, 0, 0, 0); padding: 0; text-align: center;" onclick="deleteRegcode('\{{_id}}')">
|
||||
<i class="material-icons" style="font-size: 2rem; display: inline">
|
||||
delete
|
||||
</i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
\{{/regcodes}}
|
||||
</tbody>
|
||||
</table></script><script id=template-client-list type=text/x-handlebars-template><button class="btn btn-raised btn-primary" onclick="createClient()">Create</button>
|
||||
<table class="table table-bordered" style="margin-bottom: 0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">ID</th>
|
||||
<th scope="col">Secret</th>
|
||||
<th scope="col">Maintainer</th>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col" style="width: 80px">Type</th>
|
||||
<th scope="col">Website</th>
|
||||
<th scope="col" style="width: 2.5rem">
|
||||
<div></div>
|
||||
</th>
|
||||
<th scope="col" style="width: 2.5rem"></th>
|
||||
<th scope="col" style="width: 2.5rem"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
\{{#clients}}
|
||||
<tr>
|
||||
<td>\{{ client_id }}</td>
|
||||
<td>\{{ client_secret }}</td>
|
||||
<td>\{{ maintainer.username }}</td>
|
||||
<td>\{{ name }}</td>
|
||||
<td>
|
||||
\{{#if internal}}
|
||||
<span class="badge badge-success">Internal</span>
|
||||
\{{else}}
|
||||
<span class="badge badge-danger">External</span>
|
||||
\{{/if}}
|
||||
</td>
|
||||
<td>
|
||||
<a href="\{{ website }}">\{{ website }}</a>
|
||||
</td>
|
||||
<td style="padding: 0.25em">
|
||||
<button style="border: 0; background-color: rgba(0, 0, 0, 0); padding: 0; text-align: center;" onclick="permissionsClient('\{{_id}}')">
|
||||
perm
|
||||
</button>
|
||||
</td>
|
||||
<td style="padding: 0.25em">
|
||||
<button style="border: 0; background-color: rgba(0, 0, 0, 0); padding: 0; text-align: center;" onclick="editClient('\{{_id}}')">
|
||||
<i class="material-icons" style="font-size: 2rem; display: inline">
|
||||
edit
|
||||
</i>
|
||||
</button>
|
||||
</td>
|
||||
<td style="padding: 0.25em">
|
||||
<button style="border: 0; background-color: rgba(0, 0, 0, 0); padding: 0; text-align: center;" onclick="deleteClient('\{{_id}}')">
|
||||
<i class="material-icons" style="font-size: 2rem; display: inline">
|
||||
delete
|
||||
</i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
\{{/clients}}
|
||||
</tbody>
|
||||
</table></script><script id=template-client-form type=text/x-handlebars-template><form class="form" action="JavaScript:void(null)" onsubmit="createClientSubmit(this)" style="margin-bottom: 0">
|
||||
<input type=hidden value="\{{_id}}" name=id />
|
||||
<div class="form-group">
|
||||
<label for="name_input" class="bmd-label-floating">Name</label>
|
||||
<input type="text" class="form-control" id="name_input" name=name value="\{{name}}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="redirect_input" class="bmd-label-floating">Redirect Url</label>
|
||||
<input type="text" class="form-control" id="redirect_input" name=redirect_url value="\{{redirect_url}}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="website_input" class="bmd-label-floating">Website</label>
|
||||
<input type="text" class="form-control" id="website_input" name=website value="\{{website}}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="logo_input" class="bmd-label-floating">Logo</label>
|
||||
<input type="text" class="form-control" id="logo_input" name=logo value="\{{logo}}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="internal_check" \{{#if internal}} checked="checked" \{{/if}} name=internal>
|
||||
<label class="form-check-label" for="internal_check">Internal</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span class="form-group bmd-form-group">
|
||||
<!-- needed to match padding for floating labels -->
|
||||
<button type="submit" class="btn btn-raised btn-primary">Save</button>
|
||||
</span>
|
||||
</form></script><script id=template-permission-list type=text/x-handlebars-template><h2><button class="btn btn-raised btn-primary" onclick="gotoClients()">back</button> to \{{client_name}} </h2>
|
||||
<button class="btn btn-raised btn-primary" onclick="createPermission('\{{ client_id }}')">Create</button>
|
||||
<table class="table table-bordered" style="margin-bottom: 0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">ID</th>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Description</th>
|
||||
<th scope="col" style="width: 10ch">Type</th>
|
||||
<th scope="col" style="width: 2.5rem"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
\{{#permissions}}
|
||||
<tr>
|
||||
<td>\{{ _id }}</td>
|
||||
<td>\{{ name }}</td>
|
||||
<td>\{{ description }}</td>
|
||||
<td>\{{ grant_type }}</td>
|
||||
<td style="padding: 0.25em">
|
||||
<button style="border: 0; background-color: rgba(0, 0, 0, 0); padding: 0; text-align: center;" onclick="deletePermission('\{{_id}}')">
|
||||
<i class="material-icons" style="font-size: 2rem; display: inline">
|
||||
delete
|
||||
</i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
\{{/permissions}}
|
||||
</tbody>
|
||||
</table></script><script id=template-permission-form type=text/x-handlebars-template><form class="form" action="JavaScript:void(null)" onsubmit="createPermissionSubmit(this)" style="margin-bottom: 0">
|
||||
<input type=hidden value="\{{client_id}}" name=client />
|
||||
<div class="form-group">
|
||||
<label for="name_input" class="bmd-label-floating">Name</label>
|
||||
<input type="text" class="form-control" id="name_input" name=name value="">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for=description class="bmd-label-floating">Description</label>
|
||||
<input type="text" class="form-control" id=description name=description value="">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for=type class="bmd-label-floating">Type</label>
|
||||
|
||||
<select type="text" class="form-control" id=type name=type>
|
||||
<option value="user">User granted</option>
|
||||
<option value="client">Client granted</option>
|
||||
</select>
|
||||
</div>
|
||||
<span class="form-group bmd-form-group">
|
||||
<!-- needed to match padding for floating labels -->
|
||||
<button type="submit" class="btn btn-raised btn-primary">Save</button>
|
||||
</span>
|
||||
</form></script><script>(function(){'use strict';function request(endpoint, method, data) {
|
||||
var headers = new Headers();
|
||||
headers.set("Content-Type", "application/json");
|
||||
return fetch(endpoint, {
|
||||
method: method,
|
||||
body: JSON.stringify(data),
|
||||
headers: headers,
|
||||
credentials: "include",
|
||||
})
|
||||
.then(async (e) => {
|
||||
if (e.status !== 200)
|
||||
throw new Error((await e.text()) || e.statusText);
|
||||
return e.json();
|
||||
})
|
||||
.then((e) => {
|
||||
if (e.error)
|
||||
return Promise.reject(
|
||||
new Error(
|
||||
typeof e.error === "string"
|
||||
? e.error
|
||||
: JSON.stringify(e.error)
|
||||
)
|
||||
);
|
||||
return e;
|
||||
});
|
||||
}function getFormData(element) {
|
||||
let data = {};
|
||||
if (
|
||||
element.name !== undefined &&
|
||||
element.name !== null &&
|
||||
element.name !== ""
|
||||
) {
|
||||
if (typeof element.name === "string") {
|
||||
if (element.type === "checkbox") data[element.name] = element.checked;
|
||||
else data[element.name] = element.value;
|
||||
}
|
||||
}
|
||||
element.childNodes.forEach((child) => {
|
||||
let res = getFormData(child);
|
||||
data = Object.assign(data, res);
|
||||
});
|
||||
return data;
|
||||
}Handlebars.registerHelper("humangender", function (value, options) {
|
||||
switch (value) {
|
||||
case 1:
|
||||
return "male";
|
||||
case 2:
|
||||
return "female";
|
||||
case 3:
|
||||
return "other";
|
||||
default:
|
||||
case 0:
|
||||
return "none";
|
||||
}
|
||||
});
|
||||
|
||||
// Deprecated since version 0.8.0
|
||||
Handlebars.registerHelper("formatDate", function (datetime, format) {
|
||||
return new Date(datetime).toLocaleString();
|
||||
});
|
||||
|
||||
(() => {
|
||||
const tableb = document.getElementById("table-body");
|
||||
|
||||
function setTitle(title) {
|
||||
document.getElementById("sitename").innerText = title;
|
||||
}
|
||||
|
||||
const cc = document.getElementById("custom_data");
|
||||
const ccc = document.getElementById("custom_data_cont");
|
||||
|
||||
function setCustomCard(content) {
|
||||
if (!content) {
|
||||
cc.innerHTML = "";
|
||||
ccc.style.display = "none";
|
||||
} else {
|
||||
cc.innerHTML = content;
|
||||
ccc.style.display = "";
|
||||
}
|
||||
}
|
||||
|
||||
const error_cont = document.getElementById("error_cont");
|
||||
const error_msg = document.getElementById("error_msg");
|
||||
|
||||
function catchError(error) {
|
||||
error_cont.style.display = "";
|
||||
error_msg.innerText = error.message;
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
async function renderUser() {
|
||||
console.log("Rendering User");
|
||||
setTitle("User");
|
||||
const listt = Handlebars.compile(
|
||||
document.getElementById("template-user-list").innerText
|
||||
);
|
||||
|
||||
async function loadList() {
|
||||
let data = await request("/api/admin/user", "GET");
|
||||
tableb.innerHTML = listt({
|
||||
users: data,
|
||||
});
|
||||
}
|
||||
|
||||
window.userOnChangeType = (id) => {
|
||||
request("/api/admin/user?id=" + id, "PUT")
|
||||
.then(() => loadList())
|
||||
.catch(catchError);
|
||||
};
|
||||
|
||||
window.deleteUser = (id) => {
|
||||
request("/api/admin/user?id=" + id, "DELETE")
|
||||
.then(() => loadList())
|
||||
.catch(catchError);
|
||||
};
|
||||
|
||||
await loadList();
|
||||
}
|
||||
|
||||
async function renderPermissions(client_id, client_name) {
|
||||
const listt = Handlebars.compile(
|
||||
document.getElementById("template-permission-list").innerText
|
||||
);
|
||||
const formt = Handlebars.compile(
|
||||
document.getElementById("template-permission-form").innerText
|
||||
);
|
||||
setCustomCard();
|
||||
async function loadList() {
|
||||
try {
|
||||
let data = await request(
|
||||
"/api/admin/permission?client=" + client_id,
|
||||
"GET"
|
||||
);
|
||||
tableb.innerHTML = listt({
|
||||
client_id: client_id,
|
||||
client_name: client_name,
|
||||
permissions: data,
|
||||
});
|
||||
} catch (err) {
|
||||
catchError(err);
|
||||
}
|
||||
}
|
||||
|
||||
window.gotoClients = () => {
|
||||
renderClient();
|
||||
};
|
||||
|
||||
window.deletePermission = (id) => {
|
||||
request("/api/admin/permission?id=" + id, "DELETE")
|
||||
.then(() => loadList())
|
||||
.catch(catchError);
|
||||
};
|
||||
|
||||
window.createPermission = () => {
|
||||
try {
|
||||
setCustomCard(formt({ client_id: client_id }));
|
||||
} catch (err) {
|
||||
console.log("Err", err);
|
||||
}
|
||||
};
|
||||
|
||||
window.createPermissionSubmit = (elm) => {
|
||||
console.log(elm);
|
||||
let data = getFormData(elm);
|
||||
console.log(data);
|
||||
request("/api/admin/permission", "POST", data)
|
||||
.then(() => setCustomCard())
|
||||
.then(() => loadList())
|
||||
.catch(catchError);
|
||||
};
|
||||
await loadList();
|
||||
}
|
||||
|
||||
async function renderClient() {
|
||||
console.log("Rendering Client");
|
||||
setTitle("Client");
|
||||
|
||||
const listt = Handlebars.compile(
|
||||
document.getElementById("template-client-list").innerText
|
||||
);
|
||||
const formt = Handlebars.compile(
|
||||
document.getElementById("template-client-form").innerText
|
||||
);
|
||||
|
||||
let clients = [];
|
||||
async function loadList() {
|
||||
let data = await request("/api/admin/client", "GET");
|
||||
clients = data;
|
||||
tableb.innerHTML = listt({
|
||||
clients: data,
|
||||
});
|
||||
}
|
||||
|
||||
window.permissionsClient = (id) => {
|
||||
renderPermissions(id, clients.find((e) => e._id === id).name);
|
||||
};
|
||||
|
||||
window.deleteClient = (id) => {
|
||||
request("/api/admin/client/id=" + id, "DELETE")
|
||||
.then(() => loadList())
|
||||
.catch(catchError);
|
||||
};
|
||||
|
||||
window.createClientSubmit = (elm) => {
|
||||
console.log(elm);
|
||||
let data = getFormData(elm);
|
||||
console.log(data);
|
||||
let id = data.id;
|
||||
delete data.id;
|
||||
if (id && id !== "") {
|
||||
request("/api/admin/client?id=" + id, "PUT", data)
|
||||
.then(() => setCustomCard())
|
||||
.then(() => loadList())
|
||||
.catch(catchError);
|
||||
} else {
|
||||
request("/api/admin/client", "POST", data)
|
||||
.then(() => setCustomCard())
|
||||
.then(() => loadList())
|
||||
.catch(catchError);
|
||||
}
|
||||
};
|
||||
|
||||
window.createClient = () => {
|
||||
setCustomCard(formt());
|
||||
};
|
||||
|
||||
window.editClient = (id) => {
|
||||
let client = clients.find((e) => e._id === id);
|
||||
if (!client) return catchError(new Error("Client does not exist!!"));
|
||||
setCustomCard(formt(client));
|
||||
};
|
||||
|
||||
await loadList().catch(catchError);
|
||||
}
|
||||
|
||||
async function renderRegCode() {
|
||||
console.log("Rendering RegCode");
|
||||
setTitle("RegCode");
|
||||
|
||||
const listt = Handlebars.compile(
|
||||
document.getElementById("template-regcode-list").innerText
|
||||
);
|
||||
|
||||
async function loadList() {
|
||||
let data = await request("/api/admin/regcode", "GET");
|
||||
tableb.innerHTML = listt({
|
||||
regcodes: data,
|
||||
});
|
||||
}
|
||||
|
||||
window.deleteRegcode = (id) => {
|
||||
request("/api/admin/regcode?id=" + id, "DELETE")
|
||||
.then(() => loadList())
|
||||
.catch(catchError);
|
||||
};
|
||||
|
||||
window.createRegcode = () => {
|
||||
request("/api/admin/regcode", "POST")
|
||||
.then(() => loadList())
|
||||
.catch(catchError);
|
||||
};
|
||||
|
||||
await loadList().catch(catchError);
|
||||
}
|
||||
|
||||
const type = new URL(window.location.href).searchParams.get("type");
|
||||
switch (type) {
|
||||
case "client":
|
||||
renderClient().catch(catchError);
|
||||
break;
|
||||
case "regcode":
|
||||
renderRegCode().catch(catchError);
|
||||
break;
|
||||
case "user":
|
||||
default:
|
||||
renderUser().catch(catchError);
|
||||
break;
|
||||
}
|
||||
})();})();</script></body></html>
|
@ -1,21 +0,0 @@
|
||||
{
|
||||
"sass": {
|
||||
"entry": "src\\admin/admin.scss",
|
||||
"start": 1680888864800,
|
||||
"end": 1680888864814,
|
||||
"duration": 14,
|
||||
"includedFiles": [
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\FrontendLegacy\\src\\admin\\admin.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\FrontendLegacy\\shared\\mat_bs.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\FrontendLegacy\\shared\\style.scss"
|
||||
]
|
||||
},
|
||||
"js": {
|
||||
"chars": 7975
|
||||
},
|
||||
"css": {
|
||||
"chars": 1665
|
||||
},
|
||||
"bundle_size": 21873,
|
||||
"gzip_size": 4359
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -1,52 +0,0 @@
|
||||
{
|
||||
"sass": {
|
||||
"entry": "src\\authorize/authorize.scss",
|
||||
"start": 1680888863485,
|
||||
"end": 1680888864104,
|
||||
"duration": 619,
|
||||
"includedFiles": [
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\FrontendLegacy\\src\\authorize\\authorize.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\button\\mdc-button.import.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\base\\_mixins.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\feature-targeting\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\feature-targeting\\_mixins.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\feature-targeting\\_functions.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\theme\\_constants.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\theme\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\theme\\_functions.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\animation\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\elevation\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\ripple\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\rtl\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\touch-target\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\typography\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\typography\\_functions.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\shape\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\density\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\button\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\button\\_mixins.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\elevation\\_mixins.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\theme\\_mixins.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\elevation\\_functions.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\ripple\\_mixins.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\animation\\_functions.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\ripple\\_functions.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\ripple\\_keyframes.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\rtl\\_mixins.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\touch-target\\_mixins.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\typography\\_mixins.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\shape\\_mixins.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\shape\\_functions.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\density\\_functions.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\button\\mdc-button.scss"
|
||||
]
|
||||
},
|
||||
"js": {
|
||||
"chars": 576
|
||||
},
|
||||
"css": {
|
||||
"chars": 9933
|
||||
},
|
||||
"bundle_size": 11387,
|
||||
"gzip_size": 2740
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,54 +0,0 @@
|
||||
{
|
||||
"sass": {
|
||||
"entry": "src\\login/login.scss",
|
||||
"start": 1596809618526,
|
||||
"end": 1596809618741,
|
||||
"duration": 215,
|
||||
"includedFiles": [
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\src\\login\\login.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\button\\mdc-button.import.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\base\\_mixins.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\feature-targeting\\_variables.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\feature-targeting\\_mixins.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\feature-targeting\\_functions.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\theme\\_constants.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\theme\\_variables.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\theme\\_functions.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\animation\\_variables.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\elevation\\_variables.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\ripple\\_variables.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\rtl\\_variables.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\touch-target\\_variables.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\typography\\_variables.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\typography\\_functions.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\shape\\_variables.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\density\\_variables.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\button\\_variables.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\button\\_mixins.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\elevation\\_mixins.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\theme\\_mixins.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\elevation\\_functions.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\ripple\\_mixins.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\animation\\_functions.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\ripple\\_functions.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\ripple\\_keyframes.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\rtl\\_mixins.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\touch-target\\_mixins.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\typography\\_mixins.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\shape\\_mixins.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\shape\\_functions.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\density\\_functions.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\node_modules\\@material\\button\\mdc-button.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\shared\\inputs.scss",
|
||||
"C:\\Users\\micro\\Documents\\Projekte\\OpenAuth\\server\\views\\shared\\style.scss"
|
||||
]
|
||||
},
|
||||
"js": {
|
||||
"chars": 68059
|
||||
},
|
||||
"css": {
|
||||
"chars": 11795
|
||||
},
|
||||
"bundle_size": 81043,
|
||||
"gzip_size": 20007
|
||||
}
|
@ -1 +0,0 @@
|
||||
<html><head><style></style></head><body><script>(function(){'use strict';console.log("Hello World");})();</script></body></html>
|
@ -1,19 +0,0 @@
|
||||
{
|
||||
"sass": {
|
||||
"entry": "src\\main/main.scss",
|
||||
"start": 1680888864122,
|
||||
"end": 1680888864124,
|
||||
"duration": 2,
|
||||
"includedFiles": [
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\FrontendLegacy\\src\\main\\main.scss"
|
||||
]
|
||||
},
|
||||
"js": {
|
||||
"chars": 57
|
||||
},
|
||||
"css": {
|
||||
"chars": 18
|
||||
},
|
||||
"bundle_size": 128,
|
||||
"gzip_size": 123
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -1,63 +0,0 @@
|
||||
{
|
||||
"sass": {
|
||||
"entry": "src\\register/register.scss",
|
||||
"start": 1680888864210,
|
||||
"end": 1680888864775,
|
||||
"duration": 565,
|
||||
"includedFiles": [
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\FrontendLegacy\\src\\register\\register.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\button\\mdc-button.import.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\base\\_mixins.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\feature-targeting\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\feature-targeting\\_mixins.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\feature-targeting\\_functions.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\theme\\_constants.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\theme\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\theme\\_functions.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\animation\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\elevation\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\ripple\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\rtl\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\touch-target\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\typography\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\typography\\_functions.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\shape\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\density\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\button\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\button\\_mixins.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\elevation\\_mixins.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\theme\\_mixins.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\elevation\\_functions.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\ripple\\_mixins.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\animation\\_functions.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\ripple\\_functions.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\ripple\\_keyframes.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\rtl\\_mixins.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\touch-target\\_mixins.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\typography\\_mixins.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\shape\\_mixins.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\shape\\_functions.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\density\\_functions.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\button\\mdc-button.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\form-field\\mdc-form-field.import.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\form-field\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\form-field\\_mixins.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\form-field\\mdc-form-field.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\radio\\mdc-radio.import.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\radio\\_variables.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\radio\\_mixins.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\radio\\_functions.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\node_modules\\@material\\radio\\mdc-radio.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\FrontendLegacy\\shared\\inputs.scss",
|
||||
"D:\\Projekte\\OpenServer\\OpenAuth\\server\\FrontendLegacy\\shared\\style.scss"
|
||||
]
|
||||
},
|
||||
"js": {
|
||||
"chars": 21204
|
||||
},
|
||||
"css": {
|
||||
"chars": 19609
|
||||
},
|
||||
"bundle_size": 44031,
|
||||
"gzip_size": 9858
|
||||
}
|
@ -9,7 +9,7 @@ type Profile {
|
||||
id: string;
|
||||
name: string;
|
||||
username: string;
|
||||
birthday: int;
|
||||
birthday?: int;
|
||||
gender: Gender;
|
||||
}
|
||||
|
||||
|
6
example.env
Normal file
6
example.env
Normal file
@ -0,0 +1,6 @@
|
||||
DATABASE_HOST=mongodb
|
||||
DATABASE_DATABASE=openauth
|
||||
CORE_NAME=OpenAuthDev
|
||||
CORE_URL=http://localhost
|
||||
CORE_SECRET=verysecretsecret
|
||||
WEB_PORT=3000
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hibas123/openauth",
|
||||
"version": "1.2.0",
|
||||
"version": "1.3.2",
|
||||
"author": "Fabian Stamm <dev@fabianstamm.de>",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
43
yarn.lock
43
yarn.lock
@ -581,6 +581,7 @@ __metadata:
|
||||
postcss-url: ^10.1.3
|
||||
rollup: ^3.20.2
|
||||
rollup-plugin-esbuild: ^5.0.0
|
||||
rollup-plugin-hash: ^1.3.0
|
||||
rollup-plugin-livereload: ^2.0.5
|
||||
rollup-plugin-postcss: ^4.0.2
|
||||
rollup-plugin-sizes: ^1.0.5
|
||||
@ -4385,6 +4386,16 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"hasha@npm:^2.2.0":
|
||||
version: 2.2.0
|
||||
resolution: "hasha@npm:2.2.0"
|
||||
dependencies:
|
||||
is-stream: ^1.0.1
|
||||
pinkie-promise: ^2.0.0
|
||||
checksum: 1855680c0e8a1b92686f816f2f224e184e5f2422f2ddef4f05184ea57bf954cecc017598af08b84c6aa723ccc38353469d4f143869ecfafedf1c50aec0e7ed4e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"he@npm:^1.2.0":
|
||||
version: 1.2.0
|
||||
resolution: "he@npm:1.2.0"
|
||||
@ -4858,6 +4869,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"is-stream@npm:^1.0.1":
|
||||
version: 1.1.0
|
||||
resolution: "is-stream@npm:1.1.0"
|
||||
checksum: 063c6bec9d5647aa6d42108d4c59723d2bd4ae42135a2d4db6eadbd49b7ea05b750fd69d279e5c7c45cf9da753ad2c00d8978be354d65aa9f6bb434969c6a2ae
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"is-stream@npm:^2.0.0":
|
||||
version: 2.0.1
|
||||
resolution: "is-stream@npm:2.0.1"
|
||||
@ -6207,6 +6225,22 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"pinkie-promise@npm:^2.0.0":
|
||||
version: 2.0.1
|
||||
resolution: "pinkie-promise@npm:2.0.1"
|
||||
dependencies:
|
||||
pinkie: ^2.0.0
|
||||
checksum: b53a4a2e73bf56b6f421eef711e7bdcb693d6abb474d57c5c413b809f654ba5ee750c6a96dd7225052d4b96c4d053cdcb34b708a86fceed4663303abee52fcca
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"pinkie@npm:^2.0.0":
|
||||
version: 2.0.4
|
||||
resolution: "pinkie@npm:2.0.4"
|
||||
checksum: b12b10afea1177595aab036fc220785488f67b4b0fc49e7a27979472592e971614fa1c728e63ad3e7eb748b4ec3c3dbd780819331dad6f7d635c77c10537b9db
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"pirates@npm:^4.0.1":
|
||||
version: 4.0.5
|
||||
resolution: "pirates@npm:4.0.5"
|
||||
@ -7364,6 +7398,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"rollup-plugin-hash@npm:^1.3.0":
|
||||
version: 1.3.0
|
||||
resolution: "rollup-plugin-hash@npm:1.3.0"
|
||||
dependencies:
|
||||
hasha: ^2.2.0
|
||||
checksum: ecb39f6d296664377436ab42defdc6250a4b7bd906b53aea4cb7026969a5c55a874d57c11561c98dc89c29e8b89f9dc0058ad13d7e3f5aef6247962fdf80d2bb
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"rollup-plugin-includepaths@npm:^0.2.4":
|
||||
version: 0.2.4
|
||||
resolution: "rollup-plugin-includepaths@npm:0.2.4"
|
||||
|
Reference in New Issue
Block a user