Adding new API for getting contact information of user
This commit is contained in:
parent
c8550b517a
commit
92cc97c396
@ -6,7 +6,7 @@ indent_size = 3
|
||||
end_of_line = crlf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = false
|
||||
insert_final_newline = false
|
||||
insert_final_newline = true
|
||||
|
||||
[*.yml]
|
||||
indent_size = 2
|
3
.vscode/extensions.json
vendored
Normal file
3
.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"recommendations": ["esbenp.prettier-vscode"]
|
||||
}
|
@ -37,5 +37,6 @@
|
||||
"No special token": "No special token",
|
||||
"Login token invalid": "Login token invalid",
|
||||
"No login token": "No login token",
|
||||
"You are not logged in or your login is expired (Login token invalid)": "You are not logged in or your login is expired (Login token invalid)"
|
||||
"You are not logged in or your login is expired (Login token invalid)": "You are not logged in or your login is expired (Login token invalid)",
|
||||
"You are not logged in or your login is expired (No special token)": "You are not logged in or your login is expired (No special token)"
|
||||
}
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "open_auth_service",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
16
src/api/user/contact.ts
Normal file
16
src/api/user/contact.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import { Request, Response } from "express";
|
||||
import Stacker from "../middlewares/stacker";
|
||||
import { GetUserMiddleware } from "../middlewares/user";
|
||||
import Mail from "../../models/mail";
|
||||
|
||||
export const GetContactInfos = Stacker(GetUserMiddleware(true, true), async (req: Request, res: Response) => {
|
||||
let mails = await Promise.all(
|
||||
req.user.mails.map(mail => Mail.findById(mail))
|
||||
);
|
||||
|
||||
let contact = {
|
||||
mails: mails.filter(e => !!e),
|
||||
phones: req.user.phones
|
||||
};
|
||||
res.json({ contact });
|
||||
});
|
@ -4,6 +4,7 @@ import Login from "./login";
|
||||
import TwoFactorRoute from "./twofactor";
|
||||
import { GetToken, DeleteToken } from "./token";
|
||||
import { GetAccount } from "./account";
|
||||
import { GetContactInfos } from "./contact";
|
||||
|
||||
const UserRoute: Router = Router();
|
||||
|
||||
@ -105,10 +106,24 @@ UserRoute.delete("/token/:id", DeleteToken);
|
||||
* @apiSuccess {Boolean} success
|
||||
* @apiSuccess {Object[]} user
|
||||
* @apiSuccess {String} user.id User ID
|
||||
* @apiSuccess {String} token.name Full name of the user
|
||||
* @apiSuccess {String} token.username Username of user
|
||||
* @apiSuccess {Date} token.birthday Birthday
|
||||
* @apiSuccess {Number} token.gender Gender of user (none = 0, male = 1, female = 2, other = 3)
|
||||
* @apiSuccess {String} user.name Full name of the user
|
||||
* @apiSuccess {String} user.username Username of user
|
||||
* @apiSuccess {Date} user.birthday Birthday
|
||||
* @apiSuccess {Number} user.gender Gender of user (none = 0, male = 1, female = 2, other = 3)
|
||||
*/
|
||||
UserRoute.get("/account", GetAccount);
|
||||
|
||||
/**
|
||||
* @api {delete} /user/account
|
||||
* @apiName UserGetAccount
|
||||
*
|
||||
* @apiGroup user
|
||||
* @apiPermission user
|
||||
*
|
||||
* @apiSuccess {Boolean} success
|
||||
* @apiSuccess {Object} contact
|
||||
* @apiSuccess {Object[]} user.mail EMail addresses
|
||||
* @apiSuccess {Object[]} user.phone Phone numbers
|
||||
*/
|
||||
UserRoute.get("/contact", GetContactInfos);
|
||||
export default UserRoute;
|
@ -11,10 +11,23 @@ import TwoFactor from "./models/twofactor";
|
||||
|
||||
import * as speakeasy from "speakeasy";
|
||||
import LoginToken from "./models/login_token";
|
||||
import { log } from "handlebars";
|
||||
import Mail from "./models/mail";
|
||||
|
||||
export default async function TestData() {
|
||||
await DB.db.dropDatabase();
|
||||
|
||||
let mail = await Mail.findOne({ mail: "test@test.de" });
|
||||
if (!mail) {
|
||||
mail = Mail.new({
|
||||
mail: "test@test.de",
|
||||
primary: true,
|
||||
verified: true
|
||||
})
|
||||
|
||||
await Mail.save(mail);
|
||||
}
|
||||
|
||||
|
||||
let u = await User.findOne({ username: "test" });
|
||||
if (!u) {
|
||||
Logging.log("Adding test user");
|
||||
@ -25,7 +38,12 @@ export default async function TestData() {
|
||||
name: "Test Test",
|
||||
password: "125d6d03b32c84d492747f79cf0bf6e179d287f341384eb5d6d3197525ad6be8e6df0116032935698f99a09e265073d1d6c32c274591bf1d0a20ad67cba921bc",
|
||||
salt: "test",
|
||||
admin: true
|
||||
admin: true,
|
||||
phones: [
|
||||
{ phone: "+4915962855955", primary: true, verified: true },
|
||||
{ phone: "+4915962855932", primary: false, verified: false }
|
||||
],
|
||||
mails: [mail._id]
|
||||
})
|
||||
await User.save(u);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Router, IRouter, Request, static as ServeStatic } from "express"
|
||||
import { Router, IRouter, Request, static as ServeStatic } from "express";
|
||||
import GetLoginPage from "./login";
|
||||
import GetAuthPage from "./authorize";
|
||||
import promiseMiddleware from "../helper/promiseMiddleware";
|
||||
@ -17,105 +17,120 @@ import { UserMiddleware, GetUserMiddleware } from "../api/middlewares/user";
|
||||
|
||||
Handlebars.registerHelper("appname", () => config.core.name);
|
||||
|
||||
const cacheTime = config.core.dev ? moment.duration(1, "month").asSeconds() : 10;
|
||||
const cacheTime = config.core.dev
|
||||
? moment.duration(1, "month").asSeconds()
|
||||
: 10;
|
||||
|
||||
const ViewRouter: IRouter = Router();
|
||||
ViewRouter.get("/", UserMiddleware, (req, res) => {
|
||||
res.send("This is the main page")
|
||||
})
|
||||
res.send("This is the main page");
|
||||
});
|
||||
|
||||
ViewRouter.get("/register", (req, res) => {
|
||||
res.setHeader("Cache-Control", "public, max-age=" + cacheTime);
|
||||
res.send(GetRegistrationPage(req.__));
|
||||
})
|
||||
});
|
||||
|
||||
ViewRouter.use("/login", ServeStatic("./views_repo/build/login"));
|
||||
|
||||
// ViewRouter.use("/login", (req, res) => {
|
||||
// res.setHeader("Cache-Control", "public, max-age=" + cacheTime);
|
||||
// res.send(GetLoginPage(req.__))
|
||||
// })
|
||||
ViewRouter.use("/user", ServeStatic("./views_repo/build/user"));
|
||||
|
||||
ViewRouter.get("/code", (req, res) => {
|
||||
res.setHeader("Cache-Control", "no-cache");
|
||||
if (req.query.error)
|
||||
res.send("Some error occured: " + req.query.error);
|
||||
else
|
||||
res.send(`Your code is: ${req.query.code}`);
|
||||
})
|
||||
if (req.query.error) res.send("Some error occured: " + req.query.error);
|
||||
else res.send(`Your code is: ${req.query.code}`);
|
||||
});
|
||||
|
||||
ViewRouter.get("/admin", GetUserMiddleware(false, true), (req: Request, res, next) => {
|
||||
if (!req.isAdmin) res.sendStatus(HttpStatusCode.FORBIDDEN)
|
||||
else next()
|
||||
}, (req, res) => {
|
||||
res.send(GetAdminPage(req.__))
|
||||
})
|
||||
|
||||
// ViewRouter.get("/user", Stacker(GetUserMiddleware(false, true), (req, res) => {
|
||||
// res.setHeader("Cache-Control", "public, max-age=" + cacheTime);
|
||||
// res.send(GetUserPage(req.__));
|
||||
// }));
|
||||
|
||||
ViewRouter.get("/auth", Stacker(GetUserMiddleware(false, true), async (req, res) => {
|
||||
let { scope, redirect_uri, state, client_id }: { [key: string]: string } = req.query;
|
||||
const sendError = (type) => {
|
||||
res.redirect(redirect_uri += `?error=${type}&state=${state}`);
|
||||
ViewRouter.get(
|
||||
"/admin",
|
||||
GetUserMiddleware(false, true),
|
||||
(req: Request, res, next) => {
|
||||
if (!req.isAdmin) res.sendStatus(HttpStatusCode.FORBIDDEN);
|
||||
else next();
|
||||
},
|
||||
(req, res) => {
|
||||
res.send(GetAdminPage(req.__));
|
||||
}
|
||||
let client = await Client.findOne({ client_id: client_id })
|
||||
);
|
||||
|
||||
ViewRouter.get(
|
||||
"/auth",
|
||||
Stacker(GetUserMiddleware(false, true), async (req, res) => {
|
||||
let {
|
||||
scope,
|
||||
redirect_uri,
|
||||
state,
|
||||
client_id
|
||||
}: { [key: string]: string } = req.query;
|
||||
const sendError = type => {
|
||||
res.redirect((redirect_uri += `?error=${type}&state=${state}`));
|
||||
};
|
||||
let client = await Client.findOne({ client_id: client_id });
|
||||
if (!client) {
|
||||
return sendError("unauthorized_client")
|
||||
return sendError("unauthorized_client");
|
||||
}
|
||||
|
||||
let permissions: IPermission[] = [];
|
||||
let proms: PromiseLike<void>[] = [];
|
||||
if (scope) {
|
||||
for (let perm of scope.split(";").filter(e => e !== "read_user")) {
|
||||
proms.push(Permission.findById(perm).then(p => {
|
||||
proms.push(
|
||||
Permission.findById(perm).then(p => {
|
||||
if (!p) return Promise.reject(new Error());
|
||||
permissions.push(p);
|
||||
}));
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
let err = false;
|
||||
await Promise.all(proms).catch(e => {
|
||||
err = true;
|
||||
})
|
||||
});
|
||||
Logging.debug(err);
|
||||
if (err) {
|
||||
return sendError("invalid_scope")
|
||||
return sendError("invalid_scope");
|
||||
}
|
||||
let scopes = await Promise.all(permissions.map(async perm => {
|
||||
let scopes = await Promise.all(
|
||||
permissions.map(async perm => {
|
||||
let client = await Client.findById(perm.client);
|
||||
return {
|
||||
name: perm.name,
|
||||
description: perm.description,
|
||||
logo: client.logo
|
||||
}
|
||||
}))
|
||||
};
|
||||
})
|
||||
);
|
||||
res.send(GetAuthPage(req.__, client.name, scopes));
|
||||
}));
|
||||
})
|
||||
);
|
||||
|
||||
if (config.core.dev) {
|
||||
const logo = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAASdAAAEnQB3mYfeAAAAAZiS0dEAP8A/wD/oL2nkwAAAFR0RVh0Y29tbWVudABGaWxlIHNvdXJjZTogaHR0cHM6Ly9jb21tb25zLndpa2ltZWRpYS5vcmcvd2lraS9GaWxlOkdvb2dsZS1mYXZpY29uLTIwMTUucG5nLE0iZQAAACV0RVh0ZGF0ZTpjc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Gmo+34MDFBuTZPOQ+HRRzBsXWjOAu8AyE4hHk2d14tGoNVk6+y6xNjxEJuYy/txPbT+7CnpYPaBRDFERdlLFaaR1ZKWXgvcTQ2eLX8T+Ftgzc+ZgSpw2SpMeeNVOXYnH5zWbLzBiVkIGc6jyP2tbD+LjtOM51XdDNQ6POshgjjrAI45pn8CrveFSVTsGcK2fjWxNv1M10NGRNyHAEKJKzuXCA5FliJ5HvyNP3NdkF+C8dn/ikO2g+hwAAAABJRU5ErkJggg==";
|
||||
ViewRouter.get("/devauth", (req, res) => {
|
||||
res.send(GetAuthPage(req.__, "Test 05265", [
|
||||
res.send(
|
||||
GetAuthPage(req.__, "Test 05265", [
|
||||
{
|
||||
name: "Access Profile",
|
||||
description: "It allows the application to know who you are. Required for all applications. And a lot of more Text, because why not? This will not stop, till it is multiple lines long and maybe kill the layout, so keep reading as long as you like, but I promise it will get boring after some time. So this should be enougth.",
|
||||
description:
|
||||
"It allows the application to know who you are. Required for all applications. And a lot of more Text, because why not? This will not stop, till it is multiple lines long and maybe kill the layout, so keep reading as long as you like, but I promise it will get boring after some time. So this should be enougth.",
|
||||
logo: logo
|
||||
},
|
||||
{
|
||||
name: "Test 1",
|
||||
description: "This is not an real permission. This is used just to verify the layout",
|
||||
description:
|
||||
"This is not an real permission. This is used just to verify the layout",
|
||||
logo: logo
|
||||
},
|
||||
{
|
||||
name: "Test 2",
|
||||
description: "This is not an real permission. This is used just to verify the layout",
|
||||
description:
|
||||
"This is not an real permission. This is used just to verify the layout",
|
||||
logo: logo
|
||||
}
|
||||
]))
|
||||
})
|
||||
])
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
export default ViewRouter;
|
2
views/package-lock.json
generated
2
views/package-lock.json
generated
@ -243,7 +243,7 @@
|
||||
},
|
||||
"duplexer": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
|
||||
"integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 47f98674eae7bdb6a92917a57bf4fe46dd593e8b
|
||||
Subproject commit e30b04f83c959e19393e82fc5ccc74a363aae53b
|
Loading…
Reference in New Issue
Block a user