diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..2260fb6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,27 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of the bug. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to ... +2. Click on .... +3. ... + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots, Videos, Logs or Errors** +If applicable, add screenshots to help explain your problem. +If possible, try uploading images or large logs as an attachment instead of somewhere else to ensure it's availability. + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..cc96547 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,21 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. +Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 0000000..d0ecefe --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -0,0 +1,35 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: TypeScript Compile + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x] # Oldest 'Active' version: https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js v${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: 'Cache: npm-node_modules' + uses: actions/cache@v1 + with: + path: ./node_modules/ + key: ${{ runner.os }}-npm-${{ hashFiles('./package-lock.json') }} + - run: npm i + - run: npm run build + #- run: npm test + env: + CI: true diff --git a/.gitignore b/.gitignore index 3febf95..f82cd88 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ -node_modules/ -storage/ -logs/ \ No newline at end of file +/build/ +/logs/ +/node_modules/ +/storage/ \ No newline at end of file diff --git a/.static/script-login.js b/.static/script-login.js deleted file mode 100644 index 8951682..0000000 --- a/.static/script-login.js +++ /dev/null @@ -1,105 +0,0 @@ -const BASE_URL = 'https://mc-auth.com'; - -async function submitUsername(event) { - event.preventDefault(); - - const submitBtn = document.getElementById('submitBtn'), - nameInput = document.getElementById('mcName'); - - submitBtn.classList.add('disabled'); - nameInput.classList.add('disabled'); - submitBtn.setAttribute('disabled', 'disabled'); - nameInput.setAttribute('disabled', 'disabled'); - - try { - const res = await fetch(`https://api.sprax2013.de/mc/profile/${nameInput.value}`, { - method: 'GET', - headers: { 'Accept': 'application/json' } - }); - - if (res.status === 200) { - const json = await res.json(); - - event.target.onsubmit = submitCode; - - nameInput.setAttribute('data-mcUUID', json.id); - document.getElementById('otp').setAttribute('required', 'required'); - document.getElementById('form2').classList.remove('hidden'); - - submitBtn.classList.remove('disabled'); - submitBtn.removeAttribute('disabled'); - - console.log('Valid Username:', json.name); - } else { - console.error('That username does not exist!'); - - submitBtn.classList.remove('disabled'); - submitBtn.removeAttribute('disabled'); - - nameInput.classList.remove('disabled'); - nameInput.removeAttribute('disabled'); - } - } catch (err) { - console.error('Request failed!'); - console.error(err); - - submitBtn.classList.remove('disabled'); - submitBtn.removeAttribute('disabled'); - - nameInput.classList.remove('disabled'); - nameInput.removeAttribute('disabled'); - - // console.error('Request failed - Sending form to server instead!', err); - - // event.target.onsubmit = undefined; - // event.target.submit(); - } -} - -async function submitCode(event) { - event.preventDefault(); - - const submitBtn = document.getElementById('submitBtn'), - mcUUID = document.getElementById('mcName').getAttribute('data-mcUUID'), - codeInput = document.getElementById('otp'); - - submitBtn.classList.add('disabled'); - codeInput.classList.add('disabled'); - submitBtn.setAttribute('disabled', 'disabled'); - codeInput.setAttribute('disabled', 'disabled'); - - try { - const res = await fetch(`${BASE_URL}/login/verify?uuid=${mcUUID}&otp=${codeInput.value}&keepLogin=${document.getElementById('keepLogin').checked}&returnTo=${event.target.getAttribute('data-returnTo')}`, { - method: 'GET', - headers: { 'Accept': 'application/json' } - }); - - const json = await res.json(); - - if (res.status == 200 && json.verified) { - console.log('Login was successful!'); - window.location.href = json.url || BASE_URL; - } else { - console.error('The code is invalid!'); - - submitBtn.classList.remove('disabled'); - submitBtn.removeAttribute('disabled'); - - codeInput.classList.remove('disabled'); - codeInput.removeAttribute('disabled'); - } - } catch (err) { - console.error('Request failed!'); - console.error(err); - submitBtn.classList.remove('disabled'); - submitBtn.removeAttribute('disabled'); - - codeInput.classList.remove('disabled'); - codeInput.removeAttribute('disabled'); - - // console.error('Request failed - Sending form to server instead!', err); - - // event.target.onsubmit = undefined; - // event.target.submit(); - } -} \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..6dbe943 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,76 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at developer@sprax2013.de. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f66825d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,63 @@ +# Contributing to Mc-Auth-Web +We love your input! +We want to make contributing to this project as easy and transparent as possible, whether it's: + +* Reporting a bug +* Discussing the current state of the code +* Submitting a fix +* Proposing new features + +## We Develop with GitHub +We use GitHub to host code, to track issues and feature requests, as well as accept pull requests. + +## We Use [GitHub Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests +Pull requests are the best way to propose changes to the codebase (we use [GitHub Flow](https://guides.github.com/introduction/flow/index.html)). +We actively welcome your pull requests: + +1. Fork the repo and create your branch from `master`. +2. If you've added code that should be tested, add tests. +3. If you've changed APIs, update the documentation. +5. Ensure the test suite passes. +6. Issue that pull request! + +## Any contributions you make will be under the MIT Software License +In short, when you submit code changes, your submissions are understood to be under the same +[MIT License](https://choosealicense.com/licenses/mit/) that covers the project. +Feel free to contact the maintainers if that's a concern. + +## Report bugs using GitHub's [issues](https://github.com/Mc-Auth-com/Mc-Auth-Web/issues) +We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/Mc-Auth-com/Mc-Auth-Web/issues/new) – it's that easy! + +## Write bug reports with detail, background, and sample code +Make sure to provide all the relevant information needed to reproduce the bug you are reporting. You can upload logs, images or videos if needed. + +**Great Bug Reports** tend to have: + +* A quick summary and/or background +* Steps to reproduce + * Be specific! + * Give sample code if you can – Try to make it as universal as possible, so is quickly understood. +* What you expected would happen +* What actually happens +* Notes (possibly including why you think this might be happening, or stuff you tried that didn't work) + +People *love* thorough bug reports. I'm not even kidding. + +## Use a Consistent Coding Style +* 2 spaces for indentation rather than tabs +* Use `const` or `let` rather than `var` + +## License +By contributing, you agree that your contributions will be licensed under its [MIT License](./LICENSE.md). + +## Enforcement +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at developer@sprax2013.de. +All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. +The project team is obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined +by other members of the project's leadership. + +## References +This document was adapted from [briandk](https://gist.github.com/briandk/3d2e8b3ec8daf5a27a62), who originally adapted it from Facebook's Draft. diff --git a/LICENSE b/LICENSE index 551ed2a..7e6c89a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 Mc-Auth.com +Copyright (c) 2019 Christian Koop Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 3a71813..3f88c0d 100644 --- a/README.md +++ b/README.md @@ -16,53 +16,50 @@ So I read some [oAuth2 paper](https://tools.ietf.org/html/rfc6749) and started w ## Setup **You'll need [Node.js and npm](https://nodejs.org/en/download/package-manager/) on your machine and a PostgreSQL instance** -1. Prepare your PostgreSQL server by running the commands inside `./tables.sql` +1. Prepare your PostgreSQL server by running `./database-setup.sql` 2. `npm install` -3. `npm start` +3. `npm run build` (needs to be rerun everytime the app is updated) +4. `npm run start` Or you can use `npm run dev` to automatically recompile on file changes (not recommended for production) 4. Configure all files inside `./storage` (automatically generated) -5. Edit the first variables of the files `./storage.js` and `./.static/script-login.js` 6. Type `rs` into the console or restart the process ## TODO -* Settings: Show grants (accepted and denied ones) +* **Complete Recode ([#70](https://github.com/Mc-Auth-com/Mc-Auth-Web/pull/70))** + * Redesign how localization files look and move to Crowdin + * [X] Recode demo page + * [X] Cache HTML in memory (for every language) +* Finish settings pages + * Account + * Show public Minecraft account data (as example) + * [X] Adding and confirming email address + * Export account data + * Account Security + * Show active sessions (+IP, User-Agent, ...) + * Show all apps that have been granted access + * Notification + * Allow enabling/disabling email notifications for specific events + * oAuth Apps + * [X] Delete button +* Allow grants to be temporary (60 days without activity by default) +* Fully implement verified applications + * Force 2FA when editing verified apps +* When uploading an app icon: Show notification that user needs to use the 'Save' button +* Send 'Content Security Policy' header +* Allow users to report applications (in authorization screen) +* Introduce rate limits * Create documentation/wiki - * Create Brand/Press Kit with images - * Create HTML-Button examples -* ~~Allow easy localization of HTML~~ - * ~~Functional Language-Switcher~~ - * Cache localized HTML - * ~~Create english translation~~ - * ~~Create german translation~~ -* Tell users that changes have been saved or that an upload failed/succeeded -* Rate-limit icon uploads -* Allow users to report applications (On grant-request) -* Add possibilities to be an verified application -* App-Settings - * Allow deletion - * Allow regenerating client_secret - * fix text position -* Allow 2FA for Settings-Page (Applications) - * Force for verified applications -* './.static/script-login.js' should not hold it's own `BASE_URL` -* Don't use Google Analytics (Something on webserver level is enough with a good dashboard) -* Recode in TypeScript -* ~~Notify about cookies~~ -* ~~Resize and crop uploaded images to fit inside 128px x 128px~~ -* ~~Use reCAPTCHA when creating a new app~~ -* ~~Cards (Login, Settings, App-Settings) go out of bounds when view-port is not high enough~~ -* ~~App-Settings: Description looses line-breaks~~ -* ~~Publish Demo-Application~~ -* ~~When an application requests authorization and the user is not logged in, the user can't proceed as intended~~ +* Create Brand/Press Kit with images + * With HTML Examples for buttons +* Replace 'Google Analytics' +* Admin Dashboard ## Contributors ✨ - - + +

Jonas

🎨 Logo and Banner

Brianna O'Keefe

🌍 English Translations

Jonas

🎨 Logo and Banner

Brianna O'Keefe

🌍 English Translations
## License -[MIT License](./LICENSE) - -[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FMc-Auth-com%2FMc-Auth-Web.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FMc-Auth-com%2FMc-Auth-Web?ref=badge_large) +[MIT License](./LICENSE) \ No newline at end of file diff --git a/database-setup.sql b/database-setup.sql new file mode 100644 index 0000000..b9db07b --- /dev/null +++ b/database-setup.sql @@ -0,0 +1,283 @@ +/* + Target Server Type : PostgreSQL + Target Server Version : 110009 + File Encoding : 65001 +*/ + +-- ---------------------------- +-- Extension pgcrypto +-- ---------------------------- +CREATE EXTENSION IF NOT EXISTS pgcrypto; + +-- ---------------------------- +-- Function structure for generate_snowflake +-- ---------------------------- +CREATE OR REPLACE FUNCTION "public"."generate_snowflake"(IN "seq" text, OUT "snowflake" int8) + RETURNS "pg_catalog"."int8" AS $BODY$ +DECLARE + our_epoch bigint := 1314220021721; + seq_id bigint; + now_millis bigint; + -- the id of this DB shard, must be set for each + -- schema shard you have - you could pass this as a parameter too + shard_id int := 1; +BEGIN + SELECT nextval(seq) % 1024 INTO seq_id; + + SELECT FLOOR(EXTRACT(EPOCH FROM clock_timestamp()) * 1000) INTO now_millis; + snowflake := (now_millis - our_epoch) << 23; + snowflake := snowflake | (shard_id << 10); + snowflake := snowflake | (seq_id); +END; +$BODY$ + LANGUAGE plpgsql VOLATILE + COST 100; + +-- ---------------------------- +-- Function structure for random_string +-- ---------------------------- +CREATE OR REPLACE FUNCTION "public"."random_string"("length" int4) + RETURNS "pg_catalog"."varchar" AS $BODY$ +declare + chars text[] := '{0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}'; + result varchar := ''; + i integer := 0; +begin + for i in 1..length loop + result := result || chars[1+random()*(array_length(chars, 1)-1)]; + end loop; + return result; +end; +$BODY$ + LANGUAGE plpgsql VOLATILE + COST 100; + +-- ---------------------------- +-- Type structure for GrantResult +-- ---------------------------- +DROP TYPE IF EXISTS "public"."GrantResult"; +CREATE TYPE "public"."GrantResult" AS ENUM ( + 'GRANTED', + 'DENIED', + 'REVOKED' +); + +-- ---------------------------- +-- Sequence structure for apps_id_sequence +-- ---------------------------- +DROP SEQUENCE IF EXISTS "public"."apps_id_sequence"; +CREATE SEQUENCE "public"."apps_id_sequence" +INCREMENT 1 +MINVALUE 1 +MAXVALUE 9223372036854775807 +START 1 +CACHE 1; + +-- ---------------------------- +-- Sequence structure for apps_secret_sequence +-- ---------------------------- +DROP SEQUENCE IF EXISTS "public"."apps_secret_sequence"; +CREATE SEQUENCE "public"."apps_secret_sequence" +INCREMENT 1 +MINVALUE 1 +MAXVALUE 9223372036854775807 +START 1 +CACHE 1; + +-- ---------------------------- +-- Sequence structure for grants_id_sequence +-- ---------------------------- +DROP SEQUENCE IF EXISTS "public"."grants_id_sequence"; +CREATE SEQUENCE "public"."grants_id_sequence" +INCREMENT 1 +MINVALUE 1 +MAXVALUE 9223372036854775807 +START 1 +CACHE 1; + +-- ---------------------------- +-- Sequence structure for icons_id_sequence +-- ---------------------------- +DROP SEQUENCE IF EXISTS "public"."icons_id_sequence"; +CREATE SEQUENCE "public"."icons_id_sequence" +INCREMENT 1 +MINVALUE 1 +MAXVALUE 9223372036854775807 +START 1 +CACHE 1; + +-- ---------------------------- +-- Table structure for accounts +-- ---------------------------- +DROP TABLE IF EXISTS "public"."accounts"; +CREATE TABLE "public"."accounts" ( + "id" varchar(32) COLLATE "pg_catalog"."default" NOT NULL, + "name" varchar(128) COLLATE "pg_catalog"."default" NOT NULL, + "email" varchar(255) COLLATE "pg_catalog"."default", + "email_pending" varchar(255) COLLATE "pg_catalog"."default", + "email_pending_since" timestamptz(0), + "last_login" timestamptz(0) +); + +-- ---------------------------- +-- Table structure for apps +-- ---------------------------- +DROP TABLE IF EXISTS "public"."apps"; +CREATE TABLE "public"."apps" ( + "id" int8 NOT NULL DEFAULT generate_snowflake('public.apps_id_sequence'::text), + "owner" varchar(32) COLLATE "pg_catalog"."default" NOT NULL, + "name" varchar(128) COLLATE "pg_catalog"."default" NOT NULL, + "description" varchar(512) COLLATE "pg_catalog"."default", + "website" varchar(512) COLLATE "pg_catalog"."default" NOT NULL DEFAULT '[]'::character varying, + "icon" int8, + "redirect_uris" jsonb NOT NULL DEFAULT '[]'::jsonb, + "secret" varchar(255) COLLATE "pg_catalog"."default" DEFAULT concat(random_string(8), '.', generate_snowflake('public.apps_secret_sequence'::text), '.', random_string(4)), + "verified" bool NOT NULL DEFAULT false, + "deleted" bool NOT NULL DEFAULT false, + "created" timestamptz(0) NOT NULL DEFAULT CURRENT_TIMESTAMP +); + +-- ---------------------------- +-- Table structure for grants +-- ---------------------------- +DROP TABLE IF EXISTS "public"."grants"; +CREATE TABLE "public"."grants" ( + "id" int8 NOT NULL DEFAULT generate_snowflake('public.grants_id_sequence'::text), + "app" int8 NOT NULL, + "account" varchar(32) COLLATE "pg_catalog"."default" NOT NULL, + "result" "public"."GrantResult", + "scopes" jsonb NOT NULL, + "response_type" varchar(128) COLLATE "pg_catalog"."default" NOT NULL, + "state" varchar(128) COLLATE "pg_catalog"."default", + "access_token" varchar(32) COLLATE "pg_catalog"."default", + "exchange_token" varchar(32) COLLATE "pg_catalog"."default", + "redirect_uri" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, + "issued" timestamptz(0) NOT NULL DEFAULT CURRENT_TIMESTAMP +); + +-- ---------------------------- +-- Table structure for icons +-- ---------------------------- +DROP TABLE IF EXISTS "public"."icons"; +CREATE TABLE "public"."icons" ( + "id" int8 NOT NULL DEFAULT generate_snowflake('public.icons_id_sequence'::text), + "optimized" bytea, + "original" bytea, + "duplicate_of" int8, + "added_by" varchar(32) COLLATE "pg_catalog"."default" NOT NULL, + "added" timestamptz(0) NOT NULL DEFAULT CURRENT_TIMESTAMP +); + +-- ---------------------------- +-- Table structure for otps +-- ---------------------------- +DROP TABLE IF EXISTS "public"."otps"; +CREATE TABLE "public"."otps" ( + "account" varchar(32) COLLATE "pg_catalog"."default" NOT NULL, + "code" int4 NOT NULL, + "issued" timestamptz(0) DEFAULT CURRENT_TIMESTAMP +); +COMMENT ON TABLE "public"."otps" IS 'OTPs or One-Time-Passwords'; + +-- ---------------------------- +-- Table structure for sessions +-- ---------------------------- +DROP TABLE IF EXISTS "public"."sessions"; +CREATE TABLE "public"."sessions" ( + "sid" varchar COLLATE "pg_catalog"."default" NOT NULL, + "sess" json NOT NULL, + "expire" timestamp(6) NOT NULL +); + +-- ---------------------------- +-- Alter sequences owned by +-- ---------------------------- +ALTER SEQUENCE "public"."apps_id_sequence" +OWNED BY "public"."apps"."id"; +ALTER SEQUENCE "public"."apps_secret_sequence" +OWNED BY "public"."apps"."secret"; +ALTER SEQUENCE "public"."grants_id_sequence" +OWNED BY "public"."grants"."id"; +ALTER SEQUENCE "public"."icons_id_sequence" +OWNED BY "public"."icons"."id"; + +-- ---------------------------- +-- Primary Key structure for table accounts +-- ---------------------------- +ALTER TABLE "public"."accounts" ADD CONSTRAINT "accounts_pkey" PRIMARY KEY ("id"); + +-- ---------------------------- +-- Primary Key structure for table apps +-- ---------------------------- +ALTER TABLE "public"."apps" ADD CONSTRAINT "applications_pkey" PRIMARY KEY ("id"); + +-- ---------------------------- +-- Indexes structure for table grants +-- ---------------------------- +CREATE UNIQUE INDEX "grants_app_access_token_idx" ON "public"."grants" USING btree ( + "app" "pg_catalog"."int8_ops" ASC NULLS LAST, + "access_token" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST +); +CREATE UNIQUE INDEX "grants_exchange_token_idx" ON "public"."grants" USING btree ( + "exchange_token" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST +); + +-- ---------------------------- +-- Primary Key structure for table grants +-- ---------------------------- +ALTER TABLE "public"."grants" ADD CONSTRAINT "grants_pkey" PRIMARY KEY ("id"); + +-- ---------------------------- +-- Indexes structure for table icons +-- ---------------------------- +CREATE UNIQUE INDEX "icons_digest_idx" ON "public"."icons" USING btree ( + digest(original, 'sha256'::text) "pg_catalog"."bytea_ops" ASC NULLS LAST +); +CREATE INDEX "icons_original_idx" ON "public"."icons" USING hash ( + "original" "pg_catalog"."bytea_ops" +); + +-- ---------------------------- +-- Primary Key structure for table icons +-- ---------------------------- +ALTER TABLE "public"."icons" ADD CONSTRAINT "images_pkey" PRIMARY KEY ("id"); + +-- ---------------------------- +-- Primary Key structure for table otps +-- ---------------------------- +ALTER TABLE "public"."otps" ADD CONSTRAINT "otps_pkey" PRIMARY KEY ("account"); + +-- ---------------------------- +-- Indexes structure for table sessions +-- ---------------------------- +CREATE INDEX "IDX_session_expire" ON "public"."sessions" USING btree ( + "expire" "pg_catalog"."timestamp_ops" ASC NULLS LAST +); + +-- ---------------------------- +-- Primary Key structure for table sessions +-- ---------------------------- +ALTER TABLE "public"."sessions" ADD CONSTRAINT "session_pkey" PRIMARY KEY ("sid"); + +-- ---------------------------- +-- Foreign Keys structure for table apps +-- ---------------------------- +ALTER TABLE "public"."apps" ADD CONSTRAINT "applications_icon_fkey" FOREIGN KEY ("icon") REFERENCES "public"."icons" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION; +ALTER TABLE "public"."apps" ADD CONSTRAINT "applications_owner_fkey" FOREIGN KEY ("owner") REFERENCES "public"."accounts" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION; + +-- ---------------------------- +-- Foreign Keys structure for table grants +-- ---------------------------- +ALTER TABLE "public"."grants" ADD CONSTRAINT "grants_account_fkey" FOREIGN KEY ("account") REFERENCES "public"."accounts" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION; +ALTER TABLE "public"."grants" ADD CONSTRAINT "grants_app_fkey" FOREIGN KEY ("app") REFERENCES "public"."apps" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION; + +-- ---------------------------- +-- Foreign Keys structure for table icons +-- ---------------------------- +ALTER TABLE "public"."icons" ADD CONSTRAINT "images_added_by_fkey" FOREIGN KEY ("added_by") REFERENCES "public"."accounts" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION; +ALTER TABLE "public"."icons" ADD CONSTRAINT "images_duplicate_of_fkey" FOREIGN KEY ("duplicate_of") REFERENCES "public"."icons" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION; + +-- ---------------------------- +-- Foreign Keys structure for table otps +-- ---------------------------- +ALTER TABLE "public"."otps" ADD CONSTRAINT "otps_account_fkey" FOREIGN KEY ("account") REFERENCES "public"."accounts" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION; \ No newline at end of file diff --git a/db/DB.js b/db/DB.js deleted file mode 100644 index 69a7aa7..0000000 --- a/db/DB.js +++ /dev/null @@ -1,296 +0,0 @@ -const Utils = require('../utils'); - -const { Pool } = require('pg'); -const pool = new Pool({ - host: require('./../storage/db.json')['host'], - port: require('./../storage/db.json')['port'], - user: require('./../storage/db.json')['user'], - password: require('./../storage/db.json')['password'], - database: require('./../storage/db.json')['database'], - ssl: require('./../storage/db.json')['ssl'], - max: 8 -}); -pool.on('error', (err, _client) => { - console.error('Unexpected error on idle client:', err); -}); - -/* Helper */ -function firstRow(res, key = null) { - const result = res.rows.length > 0 ? res.rows[0] : null; - - return (result && key) ? result[key] : result; -} - -/* exports */ -module.exports = { - pool, - - /* OTPs (Minecraft) */ - - /** - * @param {String} uuid - * @param {Number} otp - * @param {Function} callback err (Error), success (Boolean) - */ - invalidateOneTimePassword(uuid, otp, callback) { - pool.query(`DELETE FROM otp WHERE minecraft =$1::UUID AND code =$2 AND issued >= CURRENT_TIMESTAMP - INTERVAL '5 MINUTES' RETURNING *;`, - [uuid, otp], (err, res) => { - if (err) return callback(err); - - callback(null, res.rows.length > 0); - }); - }, - - /* Applications */ - - /** - * @param {String} clientID - * @param {Function} callback - */ - getApplication(clientID, callback) { - pool.query(`SELECT * FROM applications WHERE id =$1;`, [clientID], (err, res) => { - if (err) return callback(err); - - return callback(null, firstRow(res)); - }); - }, - - /** - * @param {String} clientID - * @param {String} mcUUID - * @param {Function} callback - */ - getApplicationForOwner(clientID, mcUUID, callback) { - pool.query(`SELECT * FROM applications WHERE id =$1 AND owner =$2::UUID;`, - [clientID, mcUUID], (err, res) => { - if (err) return callback(err); - - return callback(null, firstRow(res)); - }); - }, - - /** - * @param {String} mcUUID - * @param {Function} callback - */ - getActiveApplications(mcUUID, callback) { - pool.query(`SELECT * FROM applications WHERE owner =$1::UUID AND deleted =FALSE ORDER BY created DESC;`, - [mcUUID], (err, res) => { - if (err) return callback(err); - - const result = []; - - for (const row of res.rows) { - result.push(row); - } - - return callback(null, result); - }); - }, - - /** - * @param {String} clientID - * @param {String} name - * @param {String} description - * @param {String} redirectURIs - * @param {Function} callback - */ - updateApplication(clientID, name, description, icon, redirectURIs, callback) { - pool.query(`UPDATE applications SET name =$2, description =$3, icon =$4, redirect_uris =$5 WHERE id =$1;`, - [clientID, name, description, icon, JSON.stringify(redirectURIs)], (err, _res) => { - return callback(err || null); - }); - }, - - /** - * @param {String} name - * @param {String} description - * @param {String} secret - * @param {String} mcUUID - * @param {Function} callback - */ - createApplication(name, description, mcUUID, callback) { - pool.query(`INSERT INTO applications(name,description,owner) VALUES ($1,$2,$3) RETURNING *;`, - [name, description, mcUUID], (err, res) => { - if (err) return callback(err); - - callback(null, firstRow(res)); - }); - }, - - /** - * @param {String} clientID - * @param {Function} callback - */ - regenerateApplicationSecret(clientID, callback) { - pool.query(`UPDATE applications SET secret =DEFAULT WHERE id =$1 RETURNING secret;`, - [clientID], (err, res) => { - if (err) return callback(err); - - callback(null, firstRow(res)); - }); - }, - - /* Grants */ - - /** - * @param {String} grantID - * @param {Function} callback - */ - getUnusedGrant(grantID, mcUUID, callback) { - pool.query(`SELECT * FROM grants WHERE id =$1 AND result ='NONE'::"GrantResult" AND mc_uuid =$2 AND issued >= CURRENT_TIMESTAMP - INTERVAL '24 HOUR';`, - [grantID, mcUUID], (err, res) => { - if (err) return callback(err); - - return callback(null, firstRow(res)); - }); - }, - - /** - * @param {String} clientID - * @param {String} mcUUID - * @param {String} redirectURI - * @param {String} state - * @param {String[]} scope - * @param {Function} callback - */ - generateGrant(clientID, mcUUID, redirectURI, state, scope, callback) { - pool.query(`INSERT INTO grants(application,mc_uuid,redirect_uri,state,scope) VALUES ($1,$2,$3,$4,$5) RETURNING *;`, - [clientID, mcUUID, redirectURI.toLowerCase(), state, JSON.stringify(scope)], (err, res) => { - if (err) return callback(err); - - callback(null, firstRow(res)); - }); - }, - - /** - * @param {String} clientID - * @param {String} mcUUID - * @param {String} redirectURI - * @param {String} state - * @param {String[]} scope - * @param {Function} callback - */ - generateAccessToken(clientID, mcUUID, redirectURI, state, scope, callback) { - pool.query(`INSERT INTO grants(application,mc_uuid,redirect_uri,state,scope,access_token,result) VALUES ($1,$2,$3,$4,$5,random_string(32),'GRANTED'::"GrantResult") RETURNING access_token;`, - [clientID, mcUUID, redirectURI.toLowerCase(), state, JSON.stringify(scope)], (err, res) => { - if (err) return callback(err); - - callback(null, firstRow(res, 'access_token')); - }); - }, - - /** - * @param {String} clientID - * @param {String} redirectURI - * @param {Function} callback err (Error), success (Boolean) - */ - invalidateExchangeToken(clientID, exchangeToken, redirectURI, callback) { - pool.query(`UPDATE grants SET access_token =random_string(32) WHERE application =$1 AND access_token IS NULL AND exchange_token =$2 AND redirect_uri =$3 AND result ='GRANTED'::"GrantResult" AND issued >= CURRENT_TIMESTAMP - INTERVAL '5 MINUTES' RETURNING *;`, - [clientID, exchangeToken, redirectURI.toLowerCase()], (err, res) => { - if (err) return callback(err); - - callback(null, firstRow(res)); - }); - }, - - /** - * @param {String} grantID - * @param {Boolean} granted - * @param {Function} callback err (Error) - */ - setGrantResult(grantID, granted, callback) { - pool.query(`UPDATE grants SET result ='${granted ? 'GRANTED' : 'DENIED'}'::"GrantResult" WHERE id =$1;`, [grantID], (err, _res) => { - callback(err || null); - }); - }, - - /* Images */ - /** - * @param {Buffer} png - * @param {Buffer} original - * @param {Function} callback - */ - createImage(png, original, callback) { // What the actual fuck did I doe here o.0 - pool.connect((err, client, done) => { - if (err) { - done(); - return callback(err); - } - - client.query(`SELECT id FROM images WHERE original =$1;`, [original], (err, res) => { - if (err) { - done(); - return callback(err); - } - - if (firstRow(res, 'id')) { - done(); - - module.exports.getImageID(original, callback); - } else { - client.query(`INSERT INTO images(optimized,original) VALUES ($1,$2) ON CONFLICT DO NOTHING RETURNING id;`, - [png, original], (err, res) => { - if (err) { - done(); - return callback(err); - } - - if (firstRow(res, 'id')) { - return callback(err, firstRow(res, 'id')); - } - - this.getImageID(original, (err, id) => { - done(); - if (err) return callback(err); - - return this.getOptimizedImage(id, callback); - }); - }); - } - }); - }); - }, - - /** - * @param {Buffer} original - * @param {Function} callback - */ - getImageID(original, callback) { - pool.query(`SELECT id FROM images WHERE original =$1;`, [original], (err, res) => { - if (err) return callback(err); - - callback(null, firstRow(res, 'id')); - }); - }, - - /** - * @param {Number|String} id - * @param {Function} callback - */ - getOptimizedImage(id, callback) { - pool.query(`SELECT optimized FROM images WHERE id =$1;`, [id], (err, res) => { - if (err) return callback(err); - - callback(null, firstRow(res, 'optimized')); - }); - } -}; - -/* Maintenance */ - -// setInterval(async () => { - // pool.query(`DELETE FROM grants WHERE issued < CURRENT_TIMESTAMP - INTERVAL '24 HOUR' RETURNING *;`, - // [], (err, res) => { - // if (err) return Utils.logAndCreateError(err); - - // console.log(`Deleted ${res.rowCount} stale grants`); - // }); - - // pool.query(`DELETE FROM otp WHERE issued < CURRENT_TIMESTAMP - INTERVAL '24 HOUR' RETURNING *;`, - // [], (err, res) => { - // if (err) return Utils.logAndCreateError(err); - - // console.log(`Deleted ${res.rowCount} stale one-time-passwords`); - // }); -// }, 3 * 24 * 60 * 60 * 1000 /* 3d */); \ No newline at end of file diff --git a/html/_head_bottom.html b/html/_head_bottom.html deleted file mode 100644 index bb3cdcd..0000000 --- a/html/_head_bottom.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/html/_head_top.html b/html/_head_top.html deleted file mode 100644 index 851f82e..0000000 --- a/html/_head_top.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/html/_header.html b/html/_header.html deleted file mode 100644 index cee9d41..0000000 --- a/html/_header.html +++ /dev/null @@ -1,65 +0,0 @@ -
- -
\ No newline at end of file diff --git a/html/authorize.html b/html/authorize.html deleted file mode 100644 index 2d5a6d1..0000000 --- a/html/authorize.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - ${HTML_HEAD_TOP} - - ${LOC:html.authorize.authorizing_app} | Mc-Auth.com - - ${HTML_HEAD_BOTTOM} - - - - - - ${HTML_HEADER} - -
-
-

- ${LOC:html.authorize.login_request_from_app} -

- -
-
- -
-
-
-
- ${LOC:html.authorize.app_logo} -
- -
- -
-

${APP_DESCRIPTION}

-
-

- ${LOC:html.authorize.app_owner}: ${APP_OWNER_NAME} -
- ${LOC:html.authorize.app_created_on}: ${APP_PUBLISHED} -

-
-
- -
-
- -
-
-
-
- -
-
- ${LOC:html.authorize.your_minecraft_skin} -
- -
- -
-

${LOC:html.authorize.app_wants_access_to}

- -
    -
  • -

    - ${LOC:html.authorize.scope.profile} -
    - ${LOC:html.authorize.scope.profile.note} -

    -
  • -
-
-
- -
- - -
-
- -
-
-
-
- - ${HTML_FOOTER} - - - \ No newline at end of file diff --git a/html/err.html b/html/err.html deleted file mode 100644 index 46fe8fb..0000000 --- a/html/err.html +++ /dev/null @@ -1 +0,0 @@ -{0} | {1}

{0}

{1}

\ No newline at end of file diff --git a/html/index.html b/html/index.html deleted file mode 100644 index c9929e5..0000000 --- a/html/index.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - ${HTML_HEAD_TOP} - - Mc-Auth.com — Easy Minecraft Authentication - - ${HTML_HEAD_BOTTOM} - - - - ${HTML_HEADER} - -
-
-

${LOC:html.index.what_is.title}

-

- ${LOC:html.index.what_is.content1} -

-

- ${LOC:html.index.what_is.content2} -

- -

${LOC:html.index.how.title}

-

- ${LOC:html.index.how.content1} -

- -
    -
  1. ${LOC:html.index.how.step1}
  2. -
  3. ${LOC:html.index.how.step2}
  4. -
  5. ${LOC:html.index.how.step3}
  6. -
  7. ${LOC:html.index.how.step4}

  8. - -
  9. ${LOC:html.index.how.step5}
  10. -
- -

${LOC:html.index.how.content2}

-
- -
- -

- ${LOC:html.index.used_by} -

-
- -
- SkinDB.net Logo - - CherryBread-Network Logo -
-
- - ${HTML_FOOTER} - - - \ No newline at end of file diff --git a/html/login.html b/html/login.html deleted file mode 100644 index 3f9d573..0000000 --- a/html/login.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - ${HTML_HEAD_TOP} - - Login | Mc-Auth.com - - ${HTML_HEAD_BOTTOM} - - ?{LoggedIn:?: - - ?} - - - - ${HTML_HEADER} - -
-
-

- ${LOC:words.login} -

- -
-
- -
-
- ?{LoggedIn: -

${LOC:html.login.already_logged_in}

- - - ?: -
-
- - -
-
- -
- - -
-
- - - -
-
- -
- - -
- - -
- ?} -
-
- -
-
-
-
- - ${HTML_FOOTER} - - - \ No newline at end of file diff --git a/html/privacy.html b/html/privacy.html deleted file mode 100644 index e920b9a..0000000 --- a/html/privacy.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - ${HTML_HEAD_TOP} - - Datenschutz | Mc-Auth.com - - ${HTML_HEAD_BOTTOM} - - - - ${HTML_HEADER} - -
-
-

- Datenschutzerklärung -

-

Die Betreiber dieser Seiten nehmen - den Schutz Ihrer persönlichen Daten sehr ernst. Wir behandeln Ihre personenbezogenen Daten - vertraulich und entsprechend der gesetzlichen Datenschutzvorschriften sowie dieser - Datenschutzerklärung.

-

Die Nutzung unserer Website ist in der Regel ohne Angabe - personenbezogener Daten möglich. Soweit auf unseren Seiten personenbezogene Daten - (beispielsweise Name, Anschrift oder E-Mail-Adressen) erhoben werden, erfolgt dies, soweit - möglich, stets auf freiwilliger Basis. Diese Daten werden ohne Ihre ausdrückliche Zustimmung - nicht an Dritte weitergegeben.

-

Wir weisen darauf hin, dass die Datenübertragung im Internet - (z.B. bei der Kommunikation per E-Mail) Sicherheitslücken aufweisen kann. Ein lückenloser - Schutz der Daten vor dem Zugriff durch Dritte ist nicht möglich.

-

 

-

Cookies

-

Die Internetseiten verwenden teilweise so genannte Cookies. Cookies richten auf - Ihrem Rechner keinen Schaden an und enthalten keine Viren. Cookies dienen dazu, unser Angebot - nutzerfreundlicher, effektiver und sicherer zu machen. Cookies sind kleine Textdateien, die auf Ihrem - Rechner abgelegt werden und die Ihr Browser speichert.

-

Die meisten der von uns verwendeten - Cookies sind so genannte „Session-Cookies“. Sie werden nach Ende Ihres Besuchs automatisch - gelöscht. Andere Cookies bleiben auf Ihrem Endgerät gespeichert, bis Sie diese löschen. - Diese Cookies ermöglichen es uns, Ihren Browser beim nächsten Besuch - wiederzuerkennen.

-

Sie können Ihren Browser so einstellen, dass Sie über das Setzen - von Cookies informiert werden und Cookies nur im Einzelfall erlauben, die Annahme von Cookies für - bestimmte Fälle oder generell ausschließen sowie das automatische Löschen der - Cookies beim Schließen des Browser aktivieren. Bei der Deaktivierung von Cookies kann die - Funktionalität dieser Website eingeschränkt sein.

-

 

-

Server-Log-Files

-

Der Provider der Seiten erhebt und speichert automatisch Informationen in so genannten - Server-Log Files, die Ihr Browser automatisch an uns übermittelt. Dies sind:

- -

Diese Daten - sind nicht bestimmten Personen zuordenbar. Eine Zusammenführung dieser Daten mit anderen - Datenquellen wird nicht vorgenommen. Wir behalten uns vor, diese Daten nachträglich zu - prüfen, wenn uns konkrete Anhaltspunkte für eine rechtswidrige Nutzung bekannt - werden.

-

 

-

Kontaktformular

-

Wenn Sie uns per Kontaktformular Anfragen - zukommen lassen, werden Ihre Angaben aus dem Anfrageformular inklusive der von Ihnen dort - angegebenen Kontaktdaten zwecks Bearbeitung der Anfrage und für den Fall von Anschlussfragen - bei uns gespeichert. Diese Daten geben wir nicht ohne Ihre Einwilligung weiter.

-

 

-

Google Analytics

-

Diese - Website nutzt Funktionen des Webanalysedienstes Google Analytics. Anbieter ist die Google Inc., 1600 - Amphitheatre Parkway Mountain View, CA 94043, USA.

-

Google Analytics verwendet so genannte - "Cookies". Das sind Textdateien, die auf Ihrem Computer gespeichert werden und die eine - Analyse der Benutzung der Website durch Sie ermöglichen. Die durch den Cookie erzeugten - Informationen über Ihre Benutzung dieser Website werden in der Regel an einen Server von Google - in den USA übertragen und dort gespeichert.

-

IP Anonymisierung

-

Wir haben auf dieser Website die Funktion IP-Anonymisierung aktiviert. Dadurch wird Ihre IP-Adresse - von Google innerhalb von Mitgliedstaaten der Europäischen Union oder in anderen Vertragsstaaten - des Abkommens über den Europäischen Wirtschaftsraum vor der Übermittlung in die - USA gekürzt. Nur in Ausnahmefällen wird die volle IP-Adresse an einen Server von Google in - den USA übertragen und dort gekürzt. Im Auftrag des Betreibers dieser Website wird Google - diese Informationen benutzen, um Ihre Nutzung der Website auszuwerten, um Reports über die - Websiteaktivitäten zusammenzustellen und um weitere mit der Websitenutzung und der - Internetnutzung verbundene Dienstleistungen gegenüber dem Websitebetreiber zu erbringen. Die im - Rahmen von Google Analytics von Ihrem Browser übermittelte IP-Adresse wird nicht mit anderen - Daten von Google zusammengeführt.

-

Browser Plugin

-

Sie können die Speicherung der Cookies durch eine entsprechende Einstellung Ihrer Browser-Software - verhindern; wir weisen Sie jedoch darauf hin, dass Sie in diesem Fall gegebenenfalls nicht - sämtliche - Funktionen dieser Website vollumfänglich werden nutzen können. Sie können - darüber hinaus die Erfassung der durch den Cookie erzeugten und auf Ihre Nutzung der Website - bezogenen Daten (inkl. Ihrer IP-Adresse) an Google sowie die Verarbeitung dieser Daten durch Google - verhindern, indem Sie das unter dem folgenden Link verfügbare Browser-Plugin herunterladen und - installieren: https://tools.google.com/dlpage/gaoptout?hl=de

-

Widerspruch gegen Datenerfassung

-

Mehr Informationen zum Umgang mit Nutzerdaten bei Google Analytics finden Sie in der - Datenschutzerklärung von Google: - https://support.google.com/analytics/answer/6004245?hl=de

-

Auftragsdatenverarbeitung

-

Wir haben mit Google einen Vertrag zur Auftragsdatenverarbeitung abgeschlossen und setzen die - strengen Vorgaben der deutschen Datenschutzbehörden bei der Nutzung von Google Analytics - vollständig um.

-

Demografische Merkmale bei Google Analytics

-

Diese Website nutzt die Funktion “demografische Merkmale” von Google Analytics. - Dadurch können Berichte erstellt werden, die Aussagen zu Alter, Geschlecht und Interessen der - Seitenbesucher enthalten. Diese Daten stammen aus interessenbezogener Werbung von Google sowie - aus Besucherdaten von Drittanbietern. Diese Daten können keiner bestimmten Person zugeordnet - werden. Sie können diese Funktion jederzeit über die Anzeigeneinstellungen in Ihrem Google- - Konto deaktivieren oder die Erfassung Ihrer Daten durch Google Analytics wie im Punkt - “Widerspruch gegen Datenerfassung” dargestellt generell untersagen.

-

 

-

Kommentarfunktion auf dieser Website

-

Für die Kommentarfunktion auf dieser Seite - werden neben Ihrem Kommentar auch Angaben zum Zeitpunkt der Erstellung des Kommentars, Ihre E- - Mail-Adresse und, wenn Sie nicht anonym posten, der von Ihnen gewählte Nutzername - gespeichert.

-

Speicherung der IP Adresse

-

Unsere Kommentarfunktion speichert die IP-Adressen der Nutzer, die Kommentare verfassen. Da wir - Kommentare auf unserer Seite - nicht vor der Freischaltung prüfen, benötigen wir diese Daten, um im Falle von - Rechtsverletzungen wie Beleidigungen oder Propaganda gegen den Verfasser vorgehen zu - können.

-

 

-

SSL-Verschlüsselung

-

Diese Seite nutzt aus - Gründen der Sicherheit und zum Schutz der Übertragung vertraulicher Inhalte, wie zum - Beispiel der Anfragen, die Sie an uns als Seitenbetreiber senden, eine SSL-Verschlüsselung. Eine - verschlüsselte Verbindung erkennen Sie daran, dass die Adresszeile des Browsers von - "http://" auf "https://" wechselt und an dem Schloss-Symbol in Ihrer - Browserzeile.

-

Wenn die SSL Verschlüsselung aktiviert ist, können die Daten, die Sie - an uns übermitteln, nicht von Dritten mitgelesen werden.

-

 

-

Recht auf - Auskunft, Löschung, Sperrung

-

Sie haben jederzeit das Recht auf unentgeltliche Auskunft - über Ihre gespeicherten personenbezogenen Daten, deren Herkunft und Empfänger und den - Zweck der Datenverarbeitung sowie ein Recht auf Berichtigung, Sperrung oder Löschung dieser - Daten. Hierzu sowie zu weiteren Fragen zum Thema personenbezogene Daten können Sie sich - jederzeit unter der im Impressum angegebenen Adresse an uns wenden.

-

 

-

Widerspruch Werbe-Mails

-

Der Nutzung von im Rahmen der Impressumspflicht - veröffentlichten Kontaktdaten zur Übersendung von nicht ausdrücklich angeforderter - Werbung und Informationsmaterialien wird hiermit widersprochen. Die Betreiber der Seiten behalten sich - ausdrücklich rechtliche Schritte im Falle der unverlangten Zusendung von Werbeinformationen, etwa - durch Spam-E-Mails, vor.

-

 

-

Quelle: e-recht24.de

-
-
- - ${HTML_FOOTER} - - - \ No newline at end of file diff --git a/html/settings.html b/html/settings.html deleted file mode 100644 index 3e3ee58..0000000 --- a/html/settings.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - ${HTML_HEAD_TOP} - - ${LOC:words.settings} | Mc-Auth.com - - ${HTML_HEAD_BOTTOM} - - - - ${HTML_HEADER} - -
-
-

- ${LOC:html.settings.your_applications_title} -

- -
- ?{HasApps: -
- - - -
- -
- ?: -
- ${LOC:html.settings.you_do_not_have_any_apps} -
- -
- ?} - - -
-
-
- - ${HTML_FOOTER} - - - \ No newline at end of file diff --git a/html/settings_app.html b/html/settings_app.html deleted file mode 100644 index 41b1205..0000000 --- a/html/settings_app.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - ${HTML_HEAD_TOP} - - ${LOC:html.settings.manage_app} | Mc-Auth.com - - ${HTML_HEAD_BOTTOM} - - - - ${HTML_HEADER} - - - -
-
-

- ${LOC:html.settings.manage_app} -

- -
-
- -
-
-
-
-

client_id

-
- -
-

client_secret

-
-
- -
-
-
-
-

${APP_ID}

-
- -
- -
-
-
- -
-
-
-

- ${LOC:html.settings.click_to_show}

-
- -
- -
-
-
-
- -
- -

- ${LOC:html.settings.please_provide_exact_info} -
- ${LOC:html.settings.you_can_edit_at_any_time} -

- -
- - -
- ${LOC:html.authorize.app_logo} - -

${LOC:html.settings.click_image_above_to_upload}

-
- -
- - - ${LOC:html.settings.max_length_128_characters} -
- -
- - - ${LOC:html.settings.max_length_512_characters} -
- -
- - -
- -
- -
- - -
- -
-
-
-
-
- -
-
-
-
- - ${HTML_FOOTER} - - - \ No newline at end of file diff --git a/html/settings_create.html b/html/settings_create.html deleted file mode 100644 index 09fc22c..0000000 --- a/html/settings_create.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - ${HTML_HEAD_TOP} - - ${LOC:html.settings.create_app} | Mc-Auth.com - - ${HTML_HEAD_BOTTOM} - - - - - - ${HTML_HEADER} - -
-
-

- ${LOC:html.settings.create_app} -

- -
-
- -
-
-

${LOC:html.settings.please_provide_exact_info}

-

${LOC:html.settings.you_can_edit_at_any_time}

- -
- -
- - - ${LOC:html.settings.max_length_128_characters} -
- -
- - - ${LOC:html.settings.max_length_512_characters} -
- -
-
-
- - -
-
-
- -
-
-
-
- - ${HTML_FOOTER} - - - \ No newline at end of file diff --git a/index.js b/index.js deleted file mode 100644 index 9c84cb0..0000000 --- a/index.js +++ /dev/null @@ -1,158 +0,0 @@ -let cfg; -let server; - -function shutdownHook() { - console.log('Shutting down...'); - - const ready = async () => { - try { - await require('./db/DB').pool.end(); - } catch (ex) { } - - process.exit(); - }; - - server.close((err) => { - if (err && err.message != 'Server is not running.') console.error(err); - - ready(); - }); -} - -process.on('SIGTERM', shutdownHook); -process.on('SIGINT', shutdownHook); -process.on('SIGQUIT', shutdownHook); -process.on('SIGHUP', shutdownHook); -process.on('SIGUSR2', shutdownHook); // The package 'nodemon' is using this signal - -initStorage(() => { - cfg = require('./storage/config.json'); - - server = require('http').createServer(require('./server')); - server.on('error', (err) => { - if (err.syscall !== 'listen') { - throw err; - } - - switch (err.code) { - case 'EACCES': - console.error( - ((cfg.listen.usePath || process.env.UNIX_PATH) ? `path ${process.env.UNIX_PATH || cfg.listen.path}` : `port ${process.env.PORT || cfg.listen.port}`) + - ' requires elevated privileges' - ); - return process.exit(1); - case 'EADDRINUSE': - console.error( - ((cfg.listen.usePath || process.env.UNIX_PATH) ? `path ${process.env.UNIX_PATH || cfg.listen.path}` : `port ${process.env.PORT || cfg.listen.port}`) + - ' is already in use' - ); - return process.exit(1); - default: - throw err; - } - }); - - server.on('listening', () => { - console.log('Listening on ' + - ((cfg.listen.usePath || process.env.UNIX_PATH) ? `path ${process.env.UNIX_PATH || cfg.listen.path}` : `port ${process.env.PORT || cfg.listen.port}`) - ); - }); - - if (cfg.listen.usePath || process.env.UNIX_PATH) { - const fs = require('fs'); - - const unixSocketPath = process.env.UNIX_PATH || cfg.listen.path, - unixSocketPIDPath = (process.env.UNIX_PATH || cfg.listen.path) + '.pid', - parentDir = require('path').dirname(unixSocketPath); - - if (!fs.existsSync(parentDir)) { - fs.mkdirSync(parentDir, { recursive: true }); - } - - if (fs.existsSync(unixSocketPath)) { - let isRunning = false; - if (!fs.existsSync(unixSocketPIDPath) || !(isRunning = isProcessRunning(parseInt(fs.readFileSync(unixSocketPIDPath, 'utf-8'))))) { - fs.unlinkSync(unixSocketPath); - } - - if (isRunning) { - console.error(`It looks like the process that created '${unixSocketPath}' is still running!`); - process.exit(1); - } - } - - fs.writeFileSync(unixSocketPIDPath, process.pid); - server.listen(unixSocketPath); - fs.chmodSync(unixSocketPath, '0777'); - } else { - server.listen(process.env.PORT || cfg.listen.port, process.env.HOST || cfg.listen.host); - } -}); - -async function initStorage(callback) { - const fs = require('fs'); - - if (!fs.existsSync('./storage/')) { - fs.mkdirSync('./storage/'); - } - - if (!fs.existsSync('./storage/config.json')) { - fs.writeFileSync('./storage/config.json', JSON.stringify( - { - listen: { - usePath: false, - path: './mcAuth.unixSocket', - - host: '127.0.0.1', - port: 8091 - }, - trustProxy: false, - secureCookies: 'auto', - reCAPTCHA: { - public: '', - private: '' - } - } - , null, 4)); - - console.log('./storage/config.json has been created!'); - } - - if (!fs.existsSync('./storage/db.json')) { - fs.writeFileSync('./storage/db.json', JSON.stringify( - { - host: '127.0.0.1', - port: 5432, - user: 'mcAuth', - password: 's3cr3t!', - ssl: false, - - database: 'mcAuth' - } - , null, 4)); - - console.log('./storage/db.json has been created!'); - } - - if (!fs.existsSync('./storage/misc.json')) { - fs.writeFileSync('./storage/misc.json', JSON.stringify( - { - CookieSecret: require('crypto').createHash('sha256').update(require('uuid').v4()).update(require('crypto').randomBytes(256)).digest('hex') - } - , null, 4)); - - console.log('./storage/misc.json has been created!'); - } - - if (callback) { - callback(); - } -} - -function isProcessRunning(pid) { - try { - return process.kill(pid, 0); - } catch (ex) { - return ex.code === 'EPERM'; - } -} \ No newline at end of file diff --git a/lang/arguments.json b/lang/arguments.json deleted file mode 100644 index 8bce7a9..0000000 --- a/lang/arguments.json +++ /dev/null @@ -1,50 +0,0 @@ -[ - { - "term": "html.index.how.content1", - "args": [ - "${LOC:words.documentation}" - ] - }, - { - "term": "html.index.how.step1", - "args": [ - "${URL_BASE}/login" - ] - }, - { - "term": "html.index.how.step3", - "args": [ - "${MINECRAFT_HOST}" - ] - }, - { - "term": "html.header.logged_in_as", - "args": [ - "${Minecraft_Username}" - ] - }, - { - "term": "html.authorize.authorizing_app", - "args": [ - "${APP_NAME}" - ] - }, - { - "term": "html.authorize.app_wants_access_to", - "args": [ - "${APP_NAME}" - ] - }, - { - "term": "html.login.start_minecraft_and_connect", - "args": [ - "${MINECRAFT_HOST}" - ] - }, - { - "term": "html.authorize.login_request_from_app", - "args": [ - "${APP_NAME}" - ] - } -] \ No newline at end of file diff --git a/localization.js b/localization.js deleted file mode 100644 index ce8122a..0000000 --- a/localization.js +++ /dev/null @@ -1,100 +0,0 @@ -const fs = require('fs'); - -const defaultLang = 'en', - localizations = {}, - termArguments = {}; - -for (const fileName of fs.readdirSync('./lang')) { - if (fileName.endsWith('.json')) { - if (fileName == 'arguments.json') continue; - - const lang = (localizations[fileName.substring(0, fileName.length - 5)] = {}); - - for (const obj of JSON.parse(fs.readFileSync(`./lang/${fileName}`, 'utf-8'))) { - if (!/^\+?([a-z0-9_\.]*)$/.test(obj.term)) { - console.error(`Term (${obj.term}) in './lang/${fileName}' contains invalid characters (allowed: a-z0-9_.)`); - continue; - } - - if (lang[obj.term]) { - console.error(`Duplicate term (${obj.term}) in './lang/${fileName}'`); - continue; - } - - lang[obj.term] = obj.definition; - Object.freeze(obj.definition); // Protect from accidental modification - } - - Object.freeze(lang); // Protect from accidental modification - } else { - console.error(`Invalid file extension for './lang/${fileName}'`); - } -} - -for (const obj of JSON.parse(fs.readFileSync('./lang/arguments.json', 'utf-8'))) { - if (!localizations[defaultLang][obj.term]) { - console.error(`Skipping Localization-Argument because term '${obj.term}' is unknown for defaultLang '${defaultLang}'!`); - continue; - } - - termArguments[obj.term] = obj.args; - Object.freeze(obj.args); // Protect from accidental modification -} - -// Protect from accidental modification -Object.freeze(localizations); -Object.freeze(termArguments); - -if (!localizations[defaultLang]) { - console.error(`Could not find default localization './lang/${defaultLang}.json'`); - process.exit(3); -} - -module.exports = { - defaultLang, - - /** - * @param {String} strTerm - * @param {String} langKey - * @param {Number} amount - * - * @returns {String} - */ - getString(strTerm, langKey = defaultLang, amount = 1) { - let result = (localizations[langKey] || localizations[defaultLang])[strTerm]; - - if (!result) { - result = localizations[defaultLang][strTerm]; - } - - if (typeof result == 'object') { - if (amount == 1 && result['one']) { - result = result['one']; - } else if (amount == 0 && result['zero']) { - result = result['zero']; - } else { - result = result['other']; - } - } - - return typeof result == 'string' ? result : JSON.stringify(result); - }, - - /** - * @param {String} strTerm - * - * @returns {any[]} - */ - getArguments(strTerm) { - return Array.from(termArguments[strTerm] || []); - }, - - /** - * @param {String} langKey - * - * @returns {Boolean} - */ - isLanguageSupported(langKey) { - return langKey && typeof langKey == 'string' && langKey.length == 2 && localizations[langKey.toLowerCase()]; - } -}; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 390bab1..cd272bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "mc-auth-web", - "version": "0.1.0", + "version": "2.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -17,16 +17,145 @@ "defer-to-connect": "^1.0.1" } }, + "@types/body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-W98JrE0j2K78swW4ukqMleo8R7h/pFETjM2DQ90MF6XK2i4LO4W3gQ71Lt4w3bfm2EvVSyWHplECvB5sK22yFQ==", + "dev": true, + "requires": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "@types/caseless": { + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz", + "integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==", + "dev": true + }, "@types/color-name": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" }, + "@types/connect": { + "version": "3.4.33", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.33.tgz", + "integrity": "sha512-2+FrkXY4zllzTNfJth7jOqEHC+enpLeGslEhpnTAkg21GkRrWV4SsAtqchtT4YS9/nODBU2/ZfsBY2X4J/dX7A==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/connect-pg-simple": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@types/connect-pg-simple/-/connect-pg-simple-4.2.0.tgz", + "integrity": "sha512-Y+ptWW6q6Ll92Y0Zbqb+YiPIUd5ldNsovZJ22Oy5wc4tyl0QVqXPx+ksYCrMgUINXeBDQxJi7HcZ5iATZ62x8A==", + "dev": true, + "requires": { + "@types/express": "*", + "@types/express-session": "*", + "@types/pg": "*" + } + }, + "@types/cookie-parser": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@types/cookie-parser/-/cookie-parser-1.4.2.tgz", + "integrity": "sha512-uwcY8m6SDQqciHsqcKDGbo10GdasYsPCYkH3hVegj9qAah6pX5HivOnOuI3WYmyQMnOATV39zv/Ybs0bC/6iVg==", + "dev": true, + "requires": { + "@types/express": "*" + } + }, + "@types/cookiejar": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@types/cookiejar/-/cookiejar-2.1.1.tgz", + "integrity": "sha512-aRnpPa7ysx3aNW60hTiCtLHlQaIFsXFCgQlpakNgDNVFzbtusSY8PwjAQgRWfSk0ekNoBjO51eQRB6upA9uuyw==", + "dev": true + }, + "@types/ejs": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/ejs/-/ejs-3.0.4.tgz", + "integrity": "sha512-ZxnwyBGO4KX/82AsFHTX82eMw0PsoBcIngEat+zx0y+3yxoNDJucAihg9nAcrc+g4Cwiv/4WcWsX4oiy0ySrRQ==", + "dev": true + }, + "@types/express": { + "version": "4.17.7", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.7.tgz", + "integrity": "sha512-dCOT5lcmV/uC2J9k0rPafATeeyz+99xTt54ReX11/LObZgfzJqZNcW27zGhYyX+9iSEGXGt5qLPwRSvBZcLvtQ==", + "dev": true, + "requires": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "*", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "@types/express-serve-static-core": { + "version": "4.17.9", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.9.tgz", + "integrity": "sha512-DG0BYg6yO+ePW+XoDENYz8zhNGC3jDDEpComMYn7WJc4mY1Us8Rw9ax2YhJXxpyk2SF47PQAoQ0YyVT1a0bEkA==", + "dev": true, + "requires": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*" + } + }, + "@types/express-session": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/@types/express-session/-/express-session-1.17.0.tgz", + "integrity": "sha512-OQEHeBFE1UhChVIBhRh9qElHUvTp4BzKKHxMDkGHT7WuYk5eL93hPG7D8YAIkoBSbhNEY0RjreF15zn+U0eLjA==", + "dev": true, + "requires": { + "@types/express": "*", + "@types/node": "*" + } + }, + "@types/jsonwebtoken": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.0.tgz", + "integrity": "sha512-9bVao7LvyorRGZCw0VmH/dr7Og+NdjYSsKAxB43OQoComFbBgsEpoR9JW6+qSq/ogwVBg8GI2MfAlk4SYI4OLg==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/mime": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.3.tgz", + "integrity": "sha512-Jus9s4CDbqwocc5pOAnh8ShfrnMcPHuJYzVcSUU7lrh8Ni5HuIqX3oilL86p3dlTrk0LzHRCgA/GQ7uNCw6l2Q==", + "dev": true + }, + "@types/morgan": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@types/morgan/-/morgan-1.9.1.tgz", + "integrity": "sha512-2j5IKrgJpEP6xw/uiVb2Xfga0W0sSVD9JP9t7EZLvpBENdB0OKgcnoKS8IsjNeNnZ/86robdZ61Orl0QCFGOXg==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/node": { "version": "14.0.27", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.27.tgz", "integrity": "sha512-kVrqXhbclHNHGu9ztnAwSncIgJv/FaxmzXJvGXNdcCpV1b8u1/Mi6z6m0vwy0LzKeXFTPLH0NzwmoJ3fNCIq0g==" }, + "@types/nodemailer": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@types/nodemailer/-/nodemailer-6.4.0.tgz", + "integrity": "sha512-KY7bFWB0MahRZvVW4CuW83qcCDny59pJJ0MQ5ifvfcjNwPlIT0vW4uARO4u1gtkYnWdhSvURegecY/tzcukJcA==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/object-assign-deep": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@types/object-assign-deep/-/object-assign-deep-0.4.0.tgz", + "integrity": "sha512-3D0F3rHRNDc8cQSXNzwF1jBrJi28Mdrhc10ZLlqbJWDPYRWTTWB9Tc8JoKrgBvLKioXoPoHT6Uzf3s2F7akCUg==", + "dev": true + }, "@types/pg": { "version": "7.14.4", "resolved": "https://registry.npmjs.org/@types/pg/-/pg-7.14.4.tgz", @@ -41,6 +170,78 @@ "resolved": "https://registry.npmjs.org/@types/pg-types/-/pg-types-1.11.5.tgz", "integrity": "sha512-L8ogeT6vDzT1vxlW3KITTCt+BVXXVkLXfZ/XNm6UqbcJgxf+KPO7yjWx7dQQE8RW07KopL10x2gNMs41+IkMGQ==" }, + "@types/qs": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.4.tgz", + "integrity": "sha512-+wYo+L6ZF6BMoEjtf8zB2esQsqdV6WsjRK/GP9WOgLPrq87PbNWgIxS76dS5uvl/QXtHGakZmwTznIfcPXcKlQ==", + "dev": true + }, + "@types/range-parser": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.3.tgz", + "integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==", + "dev": true + }, + "@types/request": { + "version": "2.48.5", + "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.5.tgz", + "integrity": "sha512-/LO7xRVnL3DxJ1WkPGDQrp4VTV1reX9RkC85mJ+Qzykj2Bdw+mG15aAfDahc76HtknjzE16SX/Yddn6MxVbmGQ==", + "dev": true, + "requires": { + "@types/caseless": "*", + "@types/node": "*", + "@types/tough-cookie": "*", + "form-data": "^2.5.0" + }, + "dependencies": { + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + } + } + }, + "@types/serve-static": { + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.5.tgz", + "integrity": "sha512-6M64P58N+OXjU432WoLLBQxbA0LRGBCRm7aAGQJ+SMC1IMl0dgRVi9EFfoDcS2a7Xogygk/eGN94CfwU9UF7UQ==", + "dev": true, + "requires": { + "@types/express-serve-static-core": "*", + "@types/mime": "*" + } + }, + "@types/sharp": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@types/sharp/-/sharp-0.25.1.tgz", + "integrity": "sha512-qv9kr1RIad4nZIiIEizjoQyY9VwjwKsl7nJ8LLWHko5SZm/0+/A8ila05YQpKp8BERHxpC+i8Vr8oYyhJtlQBQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/superagent": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/superagent/-/superagent-4.1.9.tgz", + "integrity": "sha512-gpIC0p49YHT4VYDbdl0fKjOMWBurJFfYtKUIxOHzOwBtu5VT29FyldFI2vbmZ1K2iH2vS6MVcJZMjHM+652l4Q==", + "dev": true, + "requires": { + "@types/cookiejar": "*", + "@types/node": "*" + } + }, + "@types/tough-cookie": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-I99sngh224D0M7XgW1s120zxCt3VYQ3IQsuw3P3jbq5GG4yc79+ZjyKznyOGIQrflfylLgcfekeZW/vk0yng6A==", + "dev": true + }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -56,9 +257,9 @@ } }, "ajv": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.11.0.tgz", - "integrity": "sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA==", + "version": "6.12.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz", + "integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==", "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -74,11 +275,6 @@ "string-width": "^3.0.0" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" - }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", @@ -88,21 +284,13 @@ "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^5.1.0" } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "requires": { - "ansi-regex": "^4.1.0" - } } } }, "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" }, "ansi-styles": { "version": "4.2.1", @@ -111,21 +299,6 @@ "requires": { "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" - }, - "dependencies": { - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - } } }, "anymatch": { @@ -151,6 +324,12 @@ "readable-stream": "^2.0.6" } }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -169,6 +348,11 @@ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, + "async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=" + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -180,9 +364,9 @@ "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" }, "aws4": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz", - "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==" + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", + "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==" }, "balanced-match": { "version": "1.0.0", @@ -211,9 +395,9 @@ } }, "binary-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", - "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==" }, "bl": { "version": "4.0.3", @@ -272,41 +456,6 @@ "term-size": "^2.1.0", "type-fest": "^0.8.1", "widest-line": "^3.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" - }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "requires": { - "ansi-regex": "^5.0.0" - } - } } }, "brace-expansion": { @@ -335,6 +484,17 @@ "ieee754": "^1.1.4" } }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, "buffer-writer": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz", @@ -409,9 +569,9 @@ } }, "chokidar": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz", - "integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz", + "integrity": "sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A==", "requires": { "anymatch": "~3.1.1", "braces": "~3.0.2", @@ -449,13 +609,6 @@ "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", "requires": { "mimic-response": "^1.0.0" - }, - "dependencies": { - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" - } } }, "code-point-at": { @@ -470,20 +623,35 @@ "requires": { "color-convert": "^1.9.1", "color-string": "^1.5.2" + }, + "dependencies": { + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + } } }, "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "requires": { - "color-name": "1.1.3" + "color-name": "~1.1.4" } }, "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "color-string": { "version": "1.5.3", @@ -502,6 +670,11 @@ "delayed-stream": "~1.0.0" } }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -521,9 +694,9 @@ } }, "connect-pg-simple": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/connect-pg-simple/-/connect-pg-simple-6.2.0.tgz", - "integrity": "sha512-7I/X3JgXwpqpjfx5rgzZgXZhzgWaBOkmRNdOuBYYYEu1PGnNq3O7M61E5njOG+e+QKM6q59gVFx8715oz/dVJQ==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/connect-pg-simple/-/connect-pg-simple-6.2.1.tgz", + "integrity": "sha512-bwDp/gKyRtyz0V5Vxy3SATSxItWBK/wDhaacncC79+q1B1VB8SQ49AlVaQCM+XxmIO29cWX4cvsFj65mD2qrzA==", "requires": { "@types/pg": "^7.14.4", "pg": "^8.2.1" @@ -566,11 +739,36 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, + "cookiejar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==" + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "cross-env": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.2.tgz", + "integrity": "sha512-KZP/bMEOJEDCkDQAyRhu3RL2ZO/SUVrxQVI0G3YEQ+OLbRA3c6zgixe8Mq8a/z7+HKlNEjo8oiLUs8iRijY2Rw==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.1" + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, "crypto-random-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", @@ -593,11 +791,11 @@ } }, "decompress-response": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", - "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", "requires": { - "mimic-response": "^2.0.0" + "mimic-response": "^1.0.0" } }, "deep-extend": { @@ -635,6 +833,12 @@ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, "dot-prop": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz", @@ -657,11 +861,27 @@ "safer-buffer": "^2.1.0" } }, + "ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, + "ejs": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.5.tgz", + "integrity": "sha512-dldq3ZfFtgVTJMLjOe+/3sROTzALlL9E34V4/sDtUd/KlBSS0s6U1/+WPE1B4sj9CXHJpL1M6rhNJnc9Wbal9w==", + "requires": { + "jake": "^10.6.1" + } + }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", @@ -690,6 +910,11 @@ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, "etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", @@ -775,15 +1000,28 @@ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "fast-deep-equal": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==" + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, + "fast-safe-stringify": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", + "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" + }, + "filelist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.1.tgz", + "integrity": "sha512-8zSK6Nu0DQIC08mUC46sWGXi+q3GGpKydAG36k+JDba6VRpkevvOWUW5a/PhShij4+vHT9M+ghgG7eM+a9JDUQ==", + "requires": { + "minimatch": "^3.0.4" + } + }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -821,6 +1059,11 @@ "mime-types": "^2.1.12" } }, + "formidable": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.2.tgz", + "integrity": "sha512-V8gLm+41I/8kguQ4/o1D3RIHRmhYFG4pnNyonvua+40rqcEmT4+V71yaZ3B457xbbgCsCfjSPi65u/W6vK1U5Q==" + }, "forwarded": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", @@ -855,6 +1098,39 @@ "string-width": "^1.0.1", "strip-ansi": "^3.0.1", "wide-align": "^1.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + } } }, "get-stream": { @@ -910,21 +1186,6 @@ "p-cancelable": "^1.0.0", "to-readable-stream": "^1.0.0", "url-parse-lax": "^3.0.0" - }, - "dependencies": { - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "requires": { - "mimic-response": "^1.0.0" - } - }, - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" - } } }, "graceful-fs": { @@ -938,11 +1199,11 @@ "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" }, "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "requires": { - "ajv": "^6.5.5", + "ajv": "^6.12.3", "har-schema": "^2.0.0" } }, @@ -1027,9 +1288,9 @@ "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, "ipaddr.js": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", - "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" }, "is-arrayish": { "version": "0.3.2", @@ -1114,11 +1375,61 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, + "jake": { + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.2.tgz", + "integrity": "sha512-eLpKyrfG3mzvGE2Du8VoPbeSkRry093+tyNjdYaBbJS9v17knImYGNXQCUV0gLxQtF82m3E8iRb/wdSQZLoq7A==", + "requires": { + "async": "0.9.x", + "chalk": "^2.4.2", + "filelist": "^1.0.1", + "minimatch": "^3.0.4" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + } + } + }, "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", @@ -1144,6 +1455,54 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "jsonwebtoken": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", + "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "requires": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^5.6.0" + }, + "dependencies": { + "jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "requires": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -1171,6 +1530,41 @@ "package-json": "^6.3.0" } }, + "lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=" + }, + "lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" + }, + "lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=" + }, + "lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" + }, "lowercase-keys": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", @@ -1191,6 +1585,12 @@ } } }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -1212,22 +1612,22 @@ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" }, "mime-db": { - "version": "1.42.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.42.0.tgz", - "integrity": "sha512-UbfJCR4UAVRNgMpfImz05smAXK7+c+ZntjaA26ANtkXLlOe947Aag5zdIcKQULAiF9Cq4WxBi9jUs5zkA84bYQ==" + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" }, "mime-types": { - "version": "2.1.25", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.25.tgz", - "integrity": "sha512-5KhStqB5xpTAeGqKBAMgwaYMnQik7teQN4IAzC7npDv6kzeU6prfkR67bc87J1kWMPGkoaZSq1npmexMgkmEVg==", + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", "requires": { - "mime-db": "1.42.0" + "mime-db": "1.44.0" } }, "mimic-response": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", - "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" }, "minimatch": { "version": "3.0.4", @@ -1255,6 +1655,11 @@ "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" }, + "moment": { + "version": "2.27.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.27.0.tgz", + "integrity": "sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ==" + }, "morgan": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", @@ -1317,6 +1722,11 @@ "clone": "2.x" } }, + "nodemailer": { + "version": "6.4.11", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.4.11.tgz", + "integrity": "sha512-BVZBDi+aJV4O38rxsUh164Dk1NCqgh6Cm0rQSb9SK/DHGll/DrCMnycVDD7msJgZCnmVa8ASo8EZzR7jsgTukQ==" + }, "nodemon": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.4.tgz", @@ -1403,6 +1813,11 @@ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, + "object-assign-deep": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/object-assign-deep/-/object-assign-deep-0.4.0.tgz", + "integrity": "sha512-54Uvn3s+4A/cMWx9tlRez1qtc7pN7pbQ+Yi7mjLjcBpWLlP+XbSHiHbQW6CElDiV4OvuzqnMrBdkgxI1mT8V/Q==" + }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -1457,6 +1872,12 @@ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -1572,6 +1993,19 @@ "which-pm-runs": "^1.0.0" }, "dependencies": { + "decompress-response": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", + "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", + "requires": { + "mimic-response": "^2.0.0" + } + }, + "mimic-response": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", + "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==" + }, "simple-get": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz", @@ -1595,23 +2029,23 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, "proxy-addr": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", - "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", + "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", "requires": { "forwarded": "~0.1.2", - "ipaddr.js": "1.9.0" + "ipaddr.js": "1.9.1" } }, "psl": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.7.0.tgz", - "integrity": "sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ==" + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" }, "pstree.remy": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.7.tgz", - "integrity": "sha512-xsMgrUwRpuGskEzBFkH8NmTimbZ5PcPup0LA8JJkHIm2IMUbQcpo3yeLNWVrufEYjh8YwtSVh0xz6UeWc5Oh5A==" + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==" }, "pump": { "version": "3.0.0", @@ -1695,9 +2129,9 @@ } }, "registry-auth-token": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.1.1.tgz", - "integrity": "sha512-9bKS7nTl9+/A1s7tnPeGrUpRcVY+LUh7bfFgzpndALdPfXQBfQV77rQVtqgUV3ti4vc/Ik81Ex8UJDWDQ12zQA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.0.tgz", + "integrity": "sha512-P+lWzPrsgfN+UEpDS3U8AQKg/UjZX6mQSJueZj3EK+vNESoqBSpBUD3gmu4sF9lOsjXWjF11dQKUqemf3veq1w==", "requires": { "rc": "^1.2.8" } @@ -1863,10 +2297,25 @@ } } }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" }, "simple-concat": { "version": "1.0.1", @@ -1906,6 +2355,22 @@ "is-arrayish": "^0.3.1" } }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, "split": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", @@ -1936,21 +2401,36 @@ "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" }, "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "requires": { - "number-is-nan": "^1.0.0" + "ansi-regex": "^5.0.0" } } } @@ -1964,11 +2444,11 @@ } }, "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "^4.1.0" } }, "strip-json-comments": { @@ -1976,6 +2456,74 @@ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" }, + "superagent": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-6.0.0.tgz", + "integrity": "sha512-gBiyDSUR3zbYO8za+MudSNxMFSOhKcZfQ1Anya1DWzk9R32zl++cYUFHXzP3VnyvQO8h/1/uPPA9FUDDtE+qdA==", + "requires": { + "component-emitter": "^1.3.0", + "cookiejar": "^2.1.2", + "debug": "^4.1.1", + "fast-safe-stringify": "^2.0.7", + "form-data": "^3.0.0", + "formidable": "^1.2.2", + "methods": "^1.1.2", + "mime": "^2.4.6", + "qs": "^6.9.4", + "readable-stream": "^3.6.0", + "semver": "^7.3.2" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "requires": { + "ms": "^2.1.1" + } + }, + "form-data": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz", + "integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "mime": { + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz", + "integrity": "sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA==" + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "qs": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz", + "integrity": "sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ==" + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "semver": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==" + } + } + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -2064,6 +2612,19 @@ "punycode": "^2.1.1" } }, + "ts-node": { + "version": "8.10.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", + "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==", + "dev": true, + "requires": { + "arg": "^4.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.17", + "yn": "3.1.1" + } + }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -2099,6 +2660,12 @@ "is-typedarray": "^1.0.0" } }, + "typescript": { + "version": "3.9.7", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", + "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==", + "dev": true + }, "uid-safe": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", @@ -2194,6 +2761,15 @@ "extsprintf": "^1.2.0" } }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, "which-pm-runs": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", @@ -2205,51 +2781,40 @@ "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "requires": { "string-width": "^1.0.2 || 2" - } - }, - "widest-line": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", - "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", - "requires": { - "string-width": "^4.0.0" }, "dependencies": { "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" }, "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "requires": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^3.0.0" } } } }, + "widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "requires": { + "string-width": "^4.0.0" + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -2275,6 +2840,12 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true } } } diff --git a/package.json b/package.json index 4bff92c..906c9fa 100644 --- a/package.json +++ b/package.json @@ -1,43 +1,85 @@ { "name": "mc-auth-web", - "version": "1.0.0", - "description": "", - "main": "index.js", + "version": "2.0.0", + "description": "Easily login with your Minecraft account without giving your password or email to strangers! Fully oAuth2 compliant!", + "keywords": [ + "Minecraft", + "oAuth2", + "oAuth", + "Login", + "GDPR", + "API", + "restful", + "rest" + ], + "homepage": "https://mc-auth.com", + "main": "build/index.js", + "private": false, "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "start": "nodemon index.js" + "build": "tsc", + "start": "cross-env NODE_ENV=production nodemon --enable-source-maps build/index.js", + "devStart": "cross-env NODE_ENV=development ts-node src/index.ts", + "dev": "nodemon --ext ts,html,json,txt --watch ./src --watch ./resources/lang --watch ./resources/web/dynamic --watch ./resources/email --exec \"npm run devStart\"" + }, + "author": { + "name": "Christian Koop", + "url": "https://Sprax2013.de", + "email": "developer@sprax2013.de" }, - "author": "Sprax2013", "license": "MIT", - "homepage": "https://mc-auth.com", "repository": { "type": "git", - "url": "git+https://github.com/Mc-Auth-com/Mc-Auth-Web.git" + "url": "https://github.com/Mc-Auth-com/Mc-Auth-Web.git" }, "bugs": { "url": "https://github.com/Mc-Auth-com/Mc-Auth-Web/issues" }, + "engines": { + "node": ">=10.0.0" + }, "dependencies": { - "body-parser": "^1.19.0", - "connect-pg-simple": "^6.2.0", + "connect-pg-simple": "^6.2.1", "cookie-parser": "^1.4.5", + "ejs": "^3.1.5", "escape-html": "^1.0.3", "express": "^4.17.1", "express-session": "^1.17.1", + "jsonwebtoken": "^8.5.1", + "moment": "^2.27.0", "morgan": "^1.10.0", "node-cache": "^5.1.2", + "nodemailer": "^6.4.11", "nodemon": "^2.0.4", + "object-assign-deep": "^0.4.0", "pg": "^8.3.3", "request": "^2.88.2", "rotating-file-stream": "^2.1.3", "sharp": "^0.26.0", + "superagent": "^6.0.0", "uuid": "^8.3.0" }, + "devDependencies": { + "@types/connect-pg-simple": "^4.2.0", + "@types/cookie-parser": "^1.4.2", + "@types/ejs": "^3.0.4", + "@types/express": "^4.17.7", + "@types/express-session": "^1.17.0", + "@types/jsonwebtoken": "^8.5.0", + "@types/morgan": "^1.9.1", + "@types/nodemailer": "^6.4.0", + "@types/object-assign-deep": "^0.4.0", + "@types/pg": "^7.14.4", + "@types/request": "^2.48.5", + "@types/sharp": "^0.25.1", + "@types/superagent": "^4.1.9", + "cross-env": "^7.0.2", + "ts-node": "^8.10.2", + "typescript": "^3.9.7" + }, "nodemonConfig": { - "ignore": [ - "./storage", - "./logs" - ], - "ext": "js,json,html" + "watch": [ + "build" + ] } } diff --git a/resources/email/LICENSE b/resources/email/LICENSE new file mode 100644 index 0000000..9f52777 --- /dev/null +++ b/resources/email/LICENSE @@ -0,0 +1 @@ +confirm_email.html: https://github.com/mailgun/transactional-email-templates/blob/4b926d8879df3174ab0e47ef4af8bc0dab670b27/LICENSE \ No newline at end of file diff --git a/resources/email/confirm_email.html b/resources/email/confirm_email.html new file mode 100644 index 0000000..a12beaa --- /dev/null +++ b/resources/email/confirm_email.html @@ -0,0 +1,328 @@ + + + + + + + <%1- loc.getString(langKey, 'email.confirm_email.subject') -%1> | Mc-Auth.com + + + + + + + + + + + + + +
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ <%1- loc.getString(langKey, 'email.confirm_email.greeting') -%1> +
+ <%1- loc.getString(langKey, 'email.confirm_email.please_confirm') -%1> +
+ +
+ <%1- loc.getString(langKey, 'email.confirm_email.signature') -%1> +
+ <%1- loc.getString(langKey, 'email.confirm_email.report_abuse') -%1> +
+
+ + +
+
+ + + + \ No newline at end of file diff --git a/resources/email/confirm_email.txt b/resources/email/confirm_email.txt new file mode 100644 index 0000000..f442cdc --- /dev/null +++ b/resources/email/confirm_email.txt @@ -0,0 +1,9 @@ +<%1- loc.getString(langKey, 'email.confirm_email.greeting') %1> +<%1- loc.getString(langKey, 'email.confirm_email.please_confirm') %1> + +<%1- global.url.baseLocalized -%1>/settings/confirm-email/<%2- page.confirm_mail.token -%2> + +<%1- loc.getString(langKey, 'email.confirm_email.signature') %1> + + +<%1- loc.getString(langKey, 'email.confirm_email.report_abuse') %1> \ No newline at end of file diff --git a/resources/lang/arguments.json b/resources/lang/arguments.json new file mode 100644 index 0000000..ad687af --- /dev/null +++ b/resources/lang/arguments.json @@ -0,0 +1,98 @@ +[ + { + "term": "html.index.how.content1", + "args": [ + "\"><%1- loc.getString(langKey, 'words.documentation') -%1>" + ] + }, + { + "term": "html.index.how.step1", + "args": [ + "/login\"><%0- global.url.base -%0>/login" + ] + }, + { + "term": "html.index.how.step3", + "args": [ + "<%0- global.url.mcServer -%0>" + ] + }, + { + "term": "html.header.logged_in_as", + "args": [ + "<%2- con.mcProfile.name -%2>" + ] + }, + { + "term": "html.authorize.authorizing_app", + "args": [ + "<%2= page.apps[0].name -%2>" + ] + }, + { + "term": "html.authorize.app_created_by", + "args": [ + "<%2= page.appOwner ? page.appOwner.name : page.apps[0].owner -%2>" + ] + }, + { + "term": "html.authorize.app_creation_time", + "args": [ + "<%2- moment.to(page.apps[0].created) -%2>" + ] + }, + { + "term": "html.authorize.app_wants_access_to", + "args": [ + "<%2= page.apps[0].name -%2>" + ] + }, + { + "term": "html.login.start_minecraft_and_connect", + "args": [ + "<%0- global.url.mcServer -%0>" + ] + }, + { + "term": "html.authorize.login_request_from_app", + "args": [ + "<%2= page.apps[0].name -%2>" + ] + }, + { + "term": "html.settings.editing_app", + "args": [ + "<%2= page.apps[0].name -%2>" + ] + }, + { + "term": "html.settings.form.name_info", + "args": [ + "help.minecraft.net" + ] + }, + { + "term": "html.settings.form.email_info", + "args": [ + "/settings/notifications\"><%1- loc.getString(langKey, 'words.notifications') -%1>" + ] + }, + { + "term": "email.confirm_email.greeting", + "args": [ + "<%2- page.confirm_mail.mcProfile.name -%2>" + ] + }, + { + "term": "email.confirm_email.follow_on_twitter", + "args": [ + "@SpraxDev" + ] + }, + { + "term": "html.settings.form.email_pending", + "args": [ + "<%2= page.account.emailPending -%2>" + ] + } +] \ No newline at end of file diff --git a/lang/de.json b/resources/lang/de.json similarity index 58% rename from lang/de.json rename to resources/lang/de.json index e6c5d9a..f3d3b54 100644 --- a/lang/de.json +++ b/resources/lang/de.json @@ -16,8 +16,8 @@ "comment": "" }, { - "term": "html.authorize.app_owner", - "definition": "Besitzer", + "term": "html.authorize.app_created_by", + "definition": "Erstellt von {0}", "context": "", "term_plural": "", "reference": "", @@ -25,7 +25,23 @@ }, { "term": "html.authorize.app_wants_access_to", - "definition": "{1} fordert Zugriff auf", + "definition": "Folgende Informationen werden mit {0} geteilt:", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.authorize.app_creation_time", + "definition": "{0} erstellt", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.authorize.no_app_description", + "definition": "Der Anwendungs-Besitzer hat keine Beschreibung verfasst", "context": "", "term_plural": "", "reference": "", @@ -33,7 +49,23 @@ }, { "term": "html.authorize.authorizing_app", - "definition": "Zugriffsanfrage von {1}", + "definition": "Zugriffsanfrage von {0}", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.authorize.always_ask_for_app", + "definition": "Bei dieser App jedes Mal nachfragen", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.authorize.will_redirect_to", + "definition": "Du wirst umgeleitet auf", "context": "", "term_plural": "", "reference": "", @@ -41,7 +73,7 @@ }, { "term": "html.authorize.login_request_from_app", - "definition": "Loginanfrage von {1}", + "definition": "{0} möchte deine Minecraft-Identität bestätigen", "context": "", "term_plural": "", "reference": "", @@ -49,7 +81,7 @@ }, { "term": "html.authorize.scope.profile", - "definition": "\u00d6ffentliche Account-Daten", + "definition": "Öffentliche Account-Daten", "context": "", "term_plural": "", "reference": "", @@ -81,7 +113,7 @@ }, { "term": "html.footer.legal_data_protection", - "definition": "Datenschutzerkl\u00e4rung", + "definition": "Datenschutzerklärung", "context": "", "term_plural": "", "reference": "", @@ -105,7 +137,7 @@ }, { "term": "html.header.logged_in_as", - "definition": "Eingeloggt als {1}", + "definition": "Eingeloggt als {0}", "context": "", "term_plural": "", "reference": "", @@ -113,7 +145,7 @@ }, { "term": "html.header.open_language_selection", - "definition": "\u00d6ffne das Men\u00fc zur Sprachwahl", + "definition": "Öffne das Menü zur Sprachwahl", "context": "", "term_plural": "", "reference": "", @@ -137,7 +169,7 @@ }, { "term": "html.index.how.content1", - "definition": "Du bist ein Entwickler? Wirf einen Blick auf unsere {1}.", + "definition": "Du bist ein Entwickler? Wirf einen Blick auf unsere {0}.", "context": "", "term_plural": "", "reference": "", @@ -153,7 +185,7 @@ }, { "term": "html.index.how.step1", - "definition": "Besuche {1}", + "definition": "Besuche {0}", "context": "", "term_plural": "", "reference": "", @@ -169,7 +201,7 @@ }, { "term": "html.index.how.step3", - "definition": "Starte Minecraft und verbinde dich mit {1}", + "definition": "Starte Minecraft und verbinde dich mit {0}", "context": "", "term_plural": "", "reference": "", @@ -177,7 +209,7 @@ }, { "term": "html.index.how.step4", - "definition": "Gib einen 6-stelligen Code ein, den du in Minecraft siehst, und schlie\u00dfe so den Login ab", + "definition": "Gib einen 6-stelligen Code ein, den du in Minecraft siehst, und schließe so den Login ab", "context": "", "term_plural": "", "reference": "", @@ -185,7 +217,7 @@ }, { "term": "html.index.how.step5", - "definition": "Best\u00e4tige die angezeigte Anfrage oder verneine sie", + "definition": "Bestätige die angezeigte Anfrage oder verneine sie", "context": "", "term_plural": "", "reference": "", @@ -209,15 +241,15 @@ }, { "term": "html.index.what_is.content1", - "definition": "Mc-Auth.com erm\u00f6glicht es Spielern, sich mit ihren Minecraft-Account einzuloggen, ohne dessen Passwort angeben zu m\u00fcssen.
Andere Webseiten und Entwickler k\u00f6nnen diese Funktion nutzen, um eine Best\u00e4tigung anzufordern, dass du Zugriff auf einen bestimmten Account hast.", + "definition": "Mc-Auth.com ermöglicht es Spielern, sich mit ihren Minecraft-Account einzuloggen, ohne dessen Passwort angeben zu müssen.
Andere Webseiten und Entwickler können diese Funktion nutzen, um eine Bestätigung anzufordern, dass du Zugriff auf einen bestimmten Account hast.", "context": "", "term_plural": "", "reference": "", - "comment": "Muss in 2 einzelne Nachrichten aufgeteilt werden, damit
nicht in der \u00dcbersetzung vorkommt." + "comment": "Muss in 2 einzelne Nachrichten aufgeteilt werden, damit
nicht in der Übersetzung vorkommt." }, { "term": "html.index.what_is.content2", - "definition": "Dank Mc-Auth.com ist es jeder Webseite und jedem Programm eine Login-Anfrage mittels Minecraft-Account anzufragen und durchzuf\u00fchren.", + "definition": "Dank Mc-Auth.com ist es jeder Webseite und jedem Programm eine Login-Anfrage mittels Minecraft-Account anzufragen und durchzuführen.", "context": "", "term_plural": "", "reference": "", @@ -249,7 +281,7 @@ }, { "term": "html.login.kicked_with_code", - "definition": "Du wirst automatisch vom Server gekickt und erh\u00e4lst einen Code", + "definition": "Du wirst automatisch vom Server gekickt und erhälst einen Code", "context": "", "term_plural": "", "reference": "", @@ -265,7 +297,7 @@ }, { "term": "html.login.start_minecraft_and_connect", - "definition": "Starte Minecraft und verbinde dich mit dem Server {1}", + "definition": "Starte Minecraft und verbinde dich mit dem Server {0}", "context": "", "term_plural": "", "reference": "", @@ -337,7 +369,7 @@ }, { "term": "html.settings.please_provide_exact_info", - "definition": "Bitte versuche die Angaben so genau wie m\u00f6glich zu w\u00e4hlen, da sie \u00f6ffentlich sichtbar sind.", + "definition": "Bitte versuche die Angaben so genau wie möglich zu wählen, da sie öffentlich sichtbar sind.", "context": "", "term_plural": "", "reference": "", @@ -345,7 +377,7 @@ }, { "term": "html.settings.redirect_uris", - "definition": "Redirect URIs (eine pro Zeile)", + "definition": "Redirect URIs (eine pro Zeile, Groß-/Kleinschreibung beachten)", "context": "", "term_plural": "", "reference": "", @@ -353,15 +385,7 @@ }, { "term": "html.settings.return_to_settings", - "definition": "Zur\u00fcck zu den Einstellungen", - "context": "", - "term_plural": "", - "reference": "", - "comment": "" - }, - { - "term": "html.settings.you_can_edit_at_any_time", - "definition": "Alle Informationen k\u00f6nnen nachtr\u00e4glich bearbeitet werden.", + "definition": "Zurück zu den Einstellungen", "context": "", "term_plural": "", "reference": "", @@ -377,7 +401,7 @@ }, { "term": "html.settings.your_applications_title", - "definition": "Deine Anwendungen (f\u00fcr Programmierer)", + "definition": "Deine Anwendungen", "context": "", "term_plural": "", "reference": "", @@ -399,6 +423,14 @@ "reference": "", "comment": "" }, + { + "term": "words.website", + "definition": "Webseite", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, { "term": "words.deny", "definition": "Ablehnen", @@ -481,7 +513,7 @@ }, { "term": "words.save_changes", - "definition": "\u00c4nderungen Speichern", + "definition": "Änderungen Speichern", "context": "Text should be placed on a button", "term_plural": "", "reference": "", @@ -494,5 +526,189 @@ "term_plural": "", "reference": "", "comment": "" + }, + { + "term": "words.notifications", + "definition": "Benachrichtigungen", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.account_settings", + "definition": "Kontoeinstellungen", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.account_security", + "definition": "Sicherheitseinstellungen", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.developer_settings", + "definition": "Entwicklereinstellungen", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.oauth_apps", + "definition": "oAuth Apps", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.your_oauth_apps", + "definition": "Your oAuth Apps", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.editing_app", + "definition": "Editiere {0}", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "words.username", + "definition": "Benutzername", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "words.email_address", + "definition": "E-Mail-Ad­res­se", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.form.name_info", + "definition": "Dieser Name entspricht immer deinem Namen in Minecraft.\n
\nWeitere Infos findest du auf\n{0}.", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.form.email_info", + "definition": "Die Angabe einer E-Mail erhöht die Accountsicherheit auf Mc-Auth.com.\n
\nWeitere Einstellungen unter {0}.", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.delete_account", + "definition": "Konto löschen", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.delete_app", + "definition": "App löschen", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.delete_account_warning", + "definition": "Dieser Vorgang löscht deinen Account auf Mc-Auth.com — Dein Minecraft-Account ist von dieser Aktion nicht betroffen.\n
\n
\n\nDieser Vorgang wird manuell innerhalb von 7 Tagen durchgeführt.\n
\nWenn eine E-Mail hinterlegt ist, wirst du über die Löschung informiert.", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.confirm_regenerate_secret", + "definition": "Möchten Sie wirklich einen neuen client_secret generieren?", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "email.confirm_email.subject", + "definition": "Bestätigen Sie ihre E-Mail-Adresse", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "email.confirm_email.greeting", + "definition": "Hallo {0},", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "email.confirm_email.please_confirm", + "definition": "Bitte bestätigen Sie ihre E-Mail-Adresse auf Mc-Auth.com.", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.form.email_pending", + "definition": "Du hast angefangen {0} als deine E-Mail-Adresse hinzuzufügen.
Bitte prüfe deine Postfach, um den Vorgang abzuschließen.", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "email.confirm_email.signature", + "definition": "— Sprax von Mc-Auth.com", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "email.confirm_email.button_label", + "definition": "Addresse bestätigen", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "email.confirm_email.report_abuse", + "definition": "Wenn Sie diese E-Mail nicht angefordert haben, so können Sie diese Nachricht einfach ignorieren.", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "email.confirm_email.follow_on_twitter", + "definition": "Folge {0} auf Twitter", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" } ] \ No newline at end of file diff --git a/lang/en.json b/resources/lang/en.json similarity index 63% rename from lang/en.json rename to resources/lang/en.json index 33dceff..0b88aed 100644 --- a/lang/en.json +++ b/resources/lang/en.json @@ -16,8 +16,16 @@ "comment": "" }, { - "term": "html.authorize.app_owner", - "definition": "Owner", + "term": "html.authorize.app_created_by", + "definition": "Created by {0}", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.authorize.app_creation_time", + "definition": "Created {0}", "context": "", "term_plural": "", "reference": "", @@ -25,7 +33,7 @@ }, { "term": "html.authorize.app_wants_access_to", - "definition": "{1} wants access to", + "definition": "Information that will be shared with {0}:", "context": "", "term_plural": "", "reference": "", @@ -33,7 +41,7 @@ }, { "term": "html.authorize.authorizing_app", - "definition": "Authorizing {1}", + "definition": "Authorizing {0}", "context": "", "term_plural": "", "reference": "", @@ -41,7 +49,31 @@ }, { "term": "html.authorize.login_request_from_app", - "definition": "Login request from {1}", + "definition": "{0} would like to verify your Minecraft identity", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.authorize.no_app_description", + "definition": "The application owner did not provide any description", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.authorize.always_ask_for_app", + "definition": "Always ask for this application", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.authorize.will_redirect_to", + "definition": "You will be redirected to", "context": "", "term_plural": "", "reference": "", @@ -105,7 +137,7 @@ }, { "term": "html.header.logged_in_as", - "definition": "Logged in as {1}", + "definition": "Logged in as {0}", "context": "", "term_plural": "", "reference": "", @@ -137,7 +169,7 @@ }, { "term": "html.index.how.content1", - "definition": "Are you a developer? Have a look at the {1}.", + "definition": "Are you a developer? Have a look at the {0}.", "context": "", "term_plural": "", "reference": "", @@ -153,7 +185,7 @@ }, { "term": "html.index.how.step1", - "definition": "Visit {1}", + "definition": "Visit {0}", "context": "", "term_plural": "", "reference": "", @@ -169,7 +201,7 @@ }, { "term": "html.index.how.step3", - "definition": "Start Minecraft and connect to {1}", + "definition": "Start Minecraft and connect to {0}", "context": "", "term_plural": "", "reference": "", @@ -217,7 +249,7 @@ }, { "term": "html.index.what_is.content2", - "definition": "Thanks to Mc-Auth.com, third party sites of any kind can provide \u2018Minecraft-Login\u2019 as a safe and secure authentication method.", + "definition": "Thanks to Mc-Auth.com, third party sites of any kind can provide ‘Minecraft-Login’ as a safe and secure authentication method.", "context": "", "term_plural": "", "reference": "", @@ -265,7 +297,7 @@ }, { "term": "html.login.start_minecraft_and_connect", - "definition": "Start Minecraft and connect to {1}", + "definition": "Start Minecraft and connect to {0}", "context": "", "term_plural": "", "reference": "", @@ -345,7 +377,7 @@ }, { "term": "html.settings.redirect_uris", - "definition": "Redirect URIs (one per line)", + "definition": "Redirect URIs (one per line, case sensitive)", "context": "", "term_plural": "", "reference": "", @@ -360,32 +392,32 @@ "comment": "" }, { - "term": "html.settings.you_can_edit_at_any_time", - "definition": "You may return and edit this information at any time", + "term": "html.settings.you_do_not_have_any_apps", + "definition": "You have not created any applications, yet", "context": "", "term_plural": "", "reference": "", "comment": "" }, { - "term": "html.settings.you_do_not_have_any_apps", - "definition": "You have not created any applications, yet", + "term": "html.settings.your_applications_title", + "definition": "Your applications", "context": "", "term_plural": "", "reference": "", "comment": "" }, { - "term": "html.settings.your_applications_title", - "definition": "Your applications (for developers)", + "term": "words.agree", + "definition": "Agree", "context": "", "term_plural": "", "reference": "", "comment": "" }, { - "term": "words.agree", - "definition": "Agree", + "term": "words.website", + "definition": "Website", "context": "", "term_plural": "", "reference": "", @@ -494,5 +526,189 @@ "term_plural": "", "reference": "", "comment": "" + }, + { + "term": "html.settings.account_settings", + "definition": "Account", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "words.notifications", + "definition": "Notifications", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.account_security", + "definition": "Account Security", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.developer_settings", + "definition": "Developer Settings", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.oauth_apps", + "definition": "oAuth Apps", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.your_oauth_apps", + "definition": "Your oAuth Apps", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.editing_app", + "definition": "Editing {0}", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "words.username", + "definition": "Username", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "words.email_address", + "definition": "email address", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.form.name_info", + "definition": "This name is the same as your name in Minecraft.\n
\nMore information at {0}.", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.form.email_info", + "definition": "Entering an email increases the account security on Mc-Auth.com.\n
\nFurther options at {0}.", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.form.email_pending", + "definition": "You've requested adding {0} as your email address.
Please check your mails to confirm it.", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.delete_account", + "definition": "Delete account", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.delete_app", + "definition": "Delete app", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.delete_account_warning", + "definition": "This deletes your account on Mc-Auth.com — Your Minecraft account stays unaffacted.\n
\n
\n\nThis process is done manually and may require up to 7 days.\n
\nIf you've provided an email address, you'll be notified about the successfull deletion.", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "html.settings.confirm_regenerate_secret", + "definition": "Do you really want to generate a new client_secret?", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "email.confirm_email.subject", + "definition": "Confirm your email address", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "email.confirm_email.greeting", + "definition": "Greetings {0},", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "email.confirm_email.please_confirm", + "definition": "Please confirm your email address on Mc-Auth.com.", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "email.confirm_email.signature", + "definition": "— Sprax from Mc-Auth.com", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "email.confirm_email.button_label", + "definition": "Confirm address", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "email.confirm_email.report_abuse", + "definition": "If you did not request this email, you can simply ignore it.", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" + }, + { + "term": "email.confirm_email.follow_on_twitter", + "definition": "Follow {0} on Twitter", + "context": "", + "term_plural": "", + "reference": "", + "comment": "" } ] \ No newline at end of file diff --git a/html/_footer.html b/resources/web/dynamic/_footer.html similarity index 77% rename from html/_footer.html rename to resources/web/dynamic/_footer.html index 93b4c38..8f7ecfe 100644 --- a/html/_footer.html +++ b/resources/web/dynamic/_footer.html @@ -1,10 +1,10 @@ -